Error messages for SQL Connection

This topic includes the following sections:

 

The %SSC_GETEMSG function returns Vortex API, SQL OpenNet, socket, database errors, and if you’re using an ODBC database driver (VTX11 or VTX12_SQLNATIVE), it returns ODBC Driver Manager warnings and errors. It doesn’t, however, return Synergy runtime errors. You’ll need to trap Synergy runtime errors in your program (see Trapping runtime errors), and you’ll need to use Vortex API logging to view socket errors.

For information on database-specific errors, see your database documentation. (For Synergy database driver error messages, see Data access errors.)

Trapping runtime error messages in SQL Connection programs

You can trap the following runtime errors in your SQL Connection program. To see the associated error text, use SQL Connection logging, or use $ERR_CATCH in conjunction with %ERR_TRACEBACK. The following errors apply to stand-alone configurations and clients in client/server configurations.

Synergy Runtime Error Messages

Mnemonic

Error text

Explanation

$ERR_ARGSIZ

Field or array count (size) smaller than statement count (ct)

You used an array argument with fewer dimensions than the row count, or you specified fewer arguments than the statement defined.

$ERR_AXUNSUP

Unsupported feature

Your program uses an option that is not supported for the database driver. For example, this error could be caused by specifying SSQL_SCROLL_DYNAMIC, an option for %SSC_OPEN, with any database driver other than VTX11 or VTX12_SQLNATIVE.

$ERR_BADDATATYP

Wrong data type

An argument with an invalid data type has been passed to a function. Check the argument list for the correct data type.

$ERR_CHNUSE

DB channel in use

The dbchannel argument passed to %SSC_CONNECT has already been used for an active connection.

$ERR_CURSERR

ID must be a non select cursor

The cursor ID passed to a non-SELECT processing function (such as %SSC_EXECIO or %SSC_EXECUTE) is not associated with a non-SELECT statement.

ID not SELECT cursor

The cursor ID passed to a SELECT processing function (such as %SSC_MOVE or %SSC_DEFINE) is not associated with a SELECT statement.

Invalid cursor ID

The cursor ID is not associated with an active open cursor.

$ERR_NOMEM

Not enough memory
(needed x, had y)

This operation could not be performed with the available memory. This error occurs only after all memory has been reorganized and all unnecessary segments have been freed.

$ERR_NOMORECURS

No more available open cursors

You have attempted to open a cursor when the maximum number of open cursors defined in %SSC_INIT has already been reached.

$ERR_NOOPEN

Invalid DB index channel used

The dbchannel argument is not a valid connection to the database. This may be caused by a failure to establish the channel correctly with %SSC_INIT and %SSC_CONNECT, or it may be a problem with the environment. (For example, it may be that database channels were not opened with consecutive numbers starting with 1, a requirement for %SSC_INIT.)

To troubleshoot, run the SQL Connection example programs for your database.

  • If you are able to run the SQL Connection example programs, the problem lies with the way your program initializes and/or connects to database channels. Use the code for the SQL Connection example programs as a guide.
  • If you get errors when you run the SQL Connection example programs, there may be a problem with your environment. (For example, you may get DLLLOAD errors.)

$ERR_NOSQL

SQL Connection installation error or DBLOPT48 not set

You have called an SQL Connection routine before initializing SQL Connection. On Windows and UNIX systems, SQL Connection is initialized by setting system option #48 using either DBLOPT or %OPTION. On OpenVMS systems, you must call %INIT_SSQL to initialize SQL Connection. See Initializing SQL Connection for more information.

Note that on Windows, ssqlx.dll must be present when initializing SQL Connection. On UNIX systems, SSQLX.so must be present.

$ERR_SQLERR

Initialize Synergy SQL by calling %INIT_SSQL first (OpenVMS)

You have called an SQL Connection routine before initializing SQL Connection. On Windows and UNIX systems, SQL Connection is initialized by setting system option #48 using either DBLOPT or %OPTION. On OpenVMS systems, you must call %INIT_SSQL to initialize SQL Connection. See Initializing SQL Connection for more information.

Note that on Windows, ssqlx.dll must be present when initializing SQL Connection. On UNIX systems, SSQLX.so must be present.

Initialize Synergy SQL by setting DBLOPT 48 (Windows and UNIX)

Synergy SQL ERROR: uninitialized system called

Synergy SQL ERROR: Licensing error Demo period expired

The 14-day grace period has expired. Please contact Synergex or your Synergy/DE supplier for a configuration key.

Synergy SQL ERROR: Licensing error Maximum users exceeded

The maximum license capacity in the License Manager has been reached. (In other words, the number of log-ins on your system is greater than the licensed number of users.) Either contact your Synergy/DE supplier for another configuration key so you can increase the number of users, or wait until someone logs out.

Synergy SQL ERROR: Licensing error Product not installed

SQL Connection is not configured correctly. See Configuring Connectivity Series for assistance.

$ERR_WRTLIT

Writing into a literal

You have attempted to change the value of an alpha, decimal, implied-decimal, or integer literal. Generally, this error occurs when you pass a literal or an expression to a function that requires a variable, and the function attempts to modify the argument.

$ERR_WROARG

Not enough arguments

The number of arguments passed to a function is different than the number of arguments needed for the function.

Number of variables (var_ct) does not match SELECT‑ column count (col_ct)

Too few variables were defined when %SSC_MOVE was called. The cursor passed to %SSC_MOVE is associated with a SELECT statement that returns a greater number of columns than the number of variables defined for them.

Vortex API error messages

The %SSC_GETEMSG function returns the following Vortex API error messages. Errors apply to stand-alone configurations and clients in client/server configurations.

Vortex API Error Messages

Mnemonic

Error text

Explanation

BADCONV

Data conversion failed (hostvar : number)

The requested date conversion failed (where number is the number of the host variable—e.g., if number is 3, there is a data conversion problem with the third host variable). Check that the requested data is of the appropriate type. For example, this error will occur if you request a character column to be fetched into an integer and the column includes characters that are not numbers.

BADSQLDA

SQLDA is invalid

This is an internal error. Turn on Vortex API logging, repeat the steps that caused the error, and then call Synergy/DE Developer Support. (For information on Vortex API logging, see Vortex API logging.)

BLOBCOL

Invalid BLOB column ID

The column specified in the SELECT command is not a large binary object (BLOB) column. Check your SQL statement.

BLOBFILE

BLOB file operation operation_name failed

For an RDBMS that keeps large binary object (BLOB) data in external files, various file operations could fail. Make sure the process owner has write permissions to the directory.

BLOBLEN

BLOB length mismatch

This is an internal error. Turn on Vortex API logging, repeat the steps that caused the error, and then call Synergy/DE Developer Support. (For information on Vortex API logging, see Vortex API logging.)

BLOBPROC

Cannot return BLOB data via a stored procedure

To return binary large object (BLOB) or character large object (CLOB) data, use BLOB/CLOB-specific functions. Some relational databases cannot return BLOB or CLOB data through stored procedure calls.

DLLENTRY

Could not find DB
driver entry point entry_point_name
(handle: handle_name)

The loaded DLL or shared library does not contain the expected entry point. Typically, this happens when the wrong DLL has been loaded and occurs only on machines that support DLLs. Verify that none of the vtx* DLLs or VTX* shared objects have been overwritten by other DLLs and that there are no other DLLs in the path with the same name. Finally, make sure that any resources that the DLL needs are available. You can determine which resources are required for a shared library on most UNIX systems with the ldd command. (You must use third-party tools to do this on Windows systems.)

DLLLOAD

Could not load DLL_name (errno: error_number)

Could not load a needed DLL or shared library. The DLL or shared library may be missing, it may be invalid (incorrectly named or an incorrect version), its file specification may be missing from PATH (on Windows) or from the library path (on UNIX), or the listed DLL or shared library may not be able to access third-party DLLs or shared libraries it needs. See Troubleshooting DLLLOAD errors for more information.

DRVCMDI

Expected an integer parameter

The %SSC_CMD function expects the command line’s first token to be an integer. Correct your code.

DRVCMDP

Invalid parameter

A parameter to the %SSC_CMD function is invalid. Correct your code.

DRVCONF

Driver not configured

This is an internal error that typically indicates that the database driver process (VTX0_10, for example) terminated abnormally. Turn on Vortex host logging, repeat the steps that caused the error, collect any relevant information from the Windows event log (if you’re on Windows), and call Synergy/DE Developer Support. (For information on Vortex host logging, see Vortex host logging.)

DRVMULTI

Driver must be specified when multiple are present

On Windows and UNIX systems, you must specify the driver names when more than one driver is linked. (If only one driver is present, the driver name is optional.) Additionally, for ISAM access, the connect string must contain “sdms:”. For example:

genesis:public//sdms:passport

See Building connect strings for more information.

DRVNOTF

Driver driver_name not found

The connect string specifies a driver that your installation of SQL Connection is not built to support. Make sure the driver in the connect string is correct.

FETCURCLO

Attempting a FETCH from a closed cursor, cursor_name

The cursor used for the FETCH has previously been closed. Check your program logic to make sure it doesn’t use a cursor that’s been closed.

FLIPOVER

Flip buffer overflow

This error occurs if too many parameters are specified. The current limit is approximately 250 parameters. Note that multiple dimensions are not included in this limit.

INVCUR

Invalid cursor

The cursor has not been initialized. Set the cursor to ‑1 before the first call, and do not modify it after subsequent calls.

INVCURPOS

Invalid cursor for positioned EXEC

The cursor must be a valid cursor from a previous %SSC_OPEN call.

INVDATE

Invalid date/time

The format of the date or time data is invalid. Format the date or time correctly. See Converting dates and times for information on formatting dates.

INVDRVVER

DB version mismatch (expected: driver_name, found version_number)

The version of the database driver is not at the same level as the SQL OpenNet runtime library. This error is most common when SQL OpenNet client/server is being used, but can also occur if an older driver has been linked with a newer runtime library. Make sure the client and the server are running the same version of SQL Connection.

INVNUM

Invalid (internal) number

The data being converted is invalid. Call Synergy/DE Developer Support.

INVUPD

Invalid UPDATE statement

Invalid UPDATE statement for binary large object (BLOB) processing. This is a Sybase-specific error. Verify the syntax of the UPDATE statement.

MANYBIND

Too many bind(host) variables

There are too many bind variables specified for a particular stored procedure or prepared statement. Make sure the number of bind variables matches the number of bind variable positions in the statement.

MANYCCUR

Too many concurrently open cursors (cursor name: cursor number)

There are too many cursors open. Either allocate more cursors with %SSC_INIT or close cursors you don’t need.

MANYCOLS

Too many columns (number) returned by query

The query returns more columns than the database channel has been set to accept. Either modify the query to return fewer columns, or use the maxcol argument for %SSC_INIT to increase the number of columns that a query can return. The default maximum is 254 columns. See %SSC_INIT for more information.

MANYLCUR

Too many logical cursors

Too many logical cursors have been requested. Use %SSC_INIT to allocate more.

NOCONN

Not connected

A connect must be performed before any other operation.

NODRV

No DB driver linked

When generated for an %SSC_CONNECT call, check the connect string. This error indicates that the database driver specified in the connect string is not available. When generated for a call to any other function, this error indicates that there has been an attempt to reuse a channel that has been released with %SSC_RELEASE, so check your code.

NOMEM

Out of memory

This is a fatal error. Either there is no more heap memory available (which is rare), or the heaps have been corrupted. Notify your system administrator.

n/a

Null password given: logon denied

Encryption is set incorrectly on the client or the server, or the net.ini file cannot be found. Check the encryption settings and make sure VORTEX_HOME is set to the correct directory. See Using network initialization files to set network defaults.

ORAOOPT

oopt() requires two integer parameters

Oracle’s oopt() function requires two integer parameters. See Oracle’s OCI documentation for information.

POSBROW

Position EXEC requires a ‘for browse’ cursor

A positioned EXECute (UPDATE or DELETE) requires a previously opened and positioned cursor. Open the cursor in FOR BROWSE mode. This error occurs only in SQL Server and Sybase.

POSEXEC

Position EXEC requires an open cursor

A positioned EXECute (UPDATE or DELETE) requires a previously opened and positioned cursor. Verify your program logic.

UNDESDTY

Unknown DESCRIBEd data type (name type_value)

The data type of a described data type is unknown. This may occur if a relational database introduces a new data type while an older database-specific library is being used. Call Synergy/DE Developer Support.

UNSUPFNC

Unsupported function (function_name: function_number)

An unsupported database driver function has been encountered. In most cases, this is the result of a call to a routine or operation that is not supported by your version of the driver or database. Call Synergy/DE Developer Support.

SQL OpenNet error messages

The %SSC_GETEMSG function returns the following SQL OpenNet error messages. Errors apply only to clients in client/server configurations.

SQL OpenNet Error Messages

Mnemonic

Error text

Explanation

AUTHBAD

Invalid authentication syntax

The connect string syntax in invalid. Make sure the ([domain/]uid/pwd) part of the network string follows the host name. Note that this user ID and password are for the host machine, not the database. See Network string (opennet_info) syntax for more information.

n/a

Authentication failed

User and password authentication failed on the server. If you’re using a Windows server, make sure the user has “log on as batch job” privileges on the server. In addition, make sure the user and password are correct in the connect string and encryption is set to the same value on both the client and the server.

AUTHFAIL

Authentication on service failed

You are not authorized to use the requested host service. Make sure the ([domain\]uid/pwd) part of the network string is correct or contact your system administrator. Note that this user ID and password are for the host machine, not the database. See Network string (opennet_info) syntax for more information.

AUTHREQ

Host host_name requires authentication

The host you are connecting to requires additional authentication. If the ‑a option is set for vtxnetd or vtxnet2, the connect string must include a username and password for an account on the machine or an account for a domain that the machine is part of (in addition to any database log‑in information). If you’ve done this, make sure the username and password are correct. See Network string (opennet_info) syntax for more information.

BADINI

‘net.ini’ file is either missing or invalid

The net.ini file is either missing or invalid. Make sure there’s a net.ini file on the client and that it’s valid.

CONFIG

Expected a CONFIG call

If this occurs after %SSC_OPEN, it generally indicates that network connectivity errors occurred during the fetch sequence. It may also indicate that the database driver process (VTX0_10, for example) terminated abnormally. Collect any relevant information from the event log (Windows), syslog (UNIX), or the operator console (OpenVMS), and then call Synergy/DE Developer Support. You may be asked to use Vortex host logging and/or Synergy DBMS logging to assist. For information, see Vortex host logging and Synergy DBMS logging (Synergy database driver only).

Connect:errno:

 

See Socket errors.

DLLENTRY

Could not find DB driver entry point

The loaded DLL does not contain the expected entry point. Typically this happens when the wrong DLL has been loaded and occurs only on machines that support DLLs. Call Synergy/DE Developer Support.

DLLLOAD

Could not load DLL

A needed DLL or shared library could not be loaded. The DLL or shared library may be missing, it may be invalid (incorrectly named or an incorrect version), its file specification may be missing from PATH (on Windows) or from the library path (on UNIX), or the listed DLL or shared library may not be able to access third-party DLLs or shared libraries it needs. See Troubleshooting DLLLOAD errors for more information.

DLLSAFE

Loaded DLL is not thread safe

The loaded DLL is not thread safe. (Not all database drivers are.) To avoid this error, run the single-threaded daemon, vtxnet2.exe.

EXECFAIL

Exec program_name failed on host host_name errno=nnn

The service (program_name) specified in the network connection string could not be started. This will occur if the service could not be found, does not have the correct permissions, or is not listed as a valid service.

  • Make sure the service exists, is listed as a valid service, and that you are connecting with the correct user name and password.
  • Use vtxnetd/vtxnet2 logging and check the tcm_pid.log file. See vtxnetd and vtxnet2 programs.
  • Check your operating system documentation for information on the error number (nnn).

HOSTNOTFOUND

Host host_name not found

The network does not recognize host_name as a server name. Contact your network administrator or try using ping, vtxping, or synxfpng (with ‑x option) to check for the server. Make sure the spelling of host_name is correct.

n/a

Invalid integer

The number specified for the encryption key is invalid or the net.ini file is corrupt. Verify that the key is set to an integer value in the correct range, and make sure the net.ini file has no control characters.

n/a

Invalid connect string syntax (uid/pwd/datasource)

The syntax of the connect string is invalid or there’s a problem with encryption. Verify the syntax of the connect string and make sure both client and server are running versions of Connectivity Series that support encryption (version 8.1 and later). In addition, make sure the encryption setting in net.ini (on the client) matches the encryption setting on the server (set with the vtxnetd/vtxnet2 ‑k option).

INVHOSTSYN

Invalid host/service name syntax

The syntax for the host or service name is invalid. For information on connect string syntax, see Building connect strings.

INVVER

NET version mismatch (host: host_ver, client: client_ver)

The version of SQL OpenNet on the server is different than the version on the client. For example, because 1000352 is the number for 8.1 versions of SQL OpenNet, and 1000400 is the number for version 8.3 and higher, the following message indicates that a client with version 8.3 or higher is attempting to access a version 8.1 SQL OpenNet server:

NET version mismatch (host: 1000352, client: 1000400)

Make sure both client and server use the same version of Connectivity Series.

KEEPALIVE

Setting SO_KEEPALIVE failed

This indicates that the socket option keepalive failed or was not set. Call Synergy/DE Developer Support.

LINGER

Setting SO_LINGER failed

This indicates that the socket option LINGER failed or was not set. Call Synergy/DE Developer Support.

NOINTR

Host cannot be interrupted

Your program requested an %SSC_CANCEL operation, but the host you are trying to cancel cannot handle interrupts. Modify your program so that it doesn’t call the cancel operation.

NOMEM

Out of memory

This is a fatal error. Either there is no more heap memory available (which is rare), or the heaps have been corrupted. Notify your system administrator.

Recv:errno

 

See Socket errors.

SERVNOTFOUND

Service/Protocol name not found

The service or protocol cannot be found. Make sure the port used for the client matches the port used for the SQL OpenNet server.

SOCKET

Socket() failed

SQL Connection is unable to open a socket. The operating system may have run out of file descriptors. Notify your system administrator.

UNDBID

Unknown Database ID

An unknown database ID is specified in net.ini. Use the syntax documented in Setting connect string defaults and encryption in net.ini.

Socket errors

The following are the most common TCP/IP socket errors when using SQL Connection. See Troubleshooting socket errors for information.

Error text

Error numbera

Explanation

Connection reset by peer

10054 (WSAECONNRESET) on Windows

54 (ECONNRESET) on UNIX and OpenVMS

This error indicates that a connection to the server has been closed. For information, see Connection reset by peer (10054 or 54).

Connection refused

10061 (WSAECONNREFUSED) on Windows

61 (ECONNREFUSED) on UNIX and OpenVMS

This error indicates that the SQL Connection program can’t make a connection to the SQL OpenNet server. For information, see Connection refused (10061 or 61).

Unknown Error

 

If this error occurs on the server and there are no errors on the client, the SQL Connection program should ignore it and terminate normally.

If this error occurs on the client, it indicates that although a connection was gracefully closed by the server, the client was not prepared for it. This is generally caused by either a version mismatch or by network latency issues where the final packet sent by the server is not received before the default server socket shutdown is initiated. This could occur, for example, if the initial connect fails with an error. See the event log (Windows), syslog (UNIX), or operator console (OpenVMS) for information on the problem.

a. For UNIX and OpenVMS, 54 and 61 are common error numbers, but error numbers vary for different platforms.

ODBC Driver Manager errors (Windows)

The %SSC_GETEMSG function may return the following ODBC Driver Manager error message, which occurs only if you use the VTX11 or VTX12_SQLNATIVE database drivers. This error applies to stand-alone connections and servers in client/server connections.

Error text

Explanation

Connection is busy with results for another hstmt

Most likely this is caused by an SQL Connection program that uses client-side cursors but has multiple concurrently active result sets. (Client-side cursors support only a single active result set.) Use server-side cursors.

Data Source name not found and no default driver specified

The DSN specified in the connect string doesn’t exist (check the spelling), encryption is set incorrectly on the client or the server, or the net.ini file cannot be found. Check the encryption settings and make sure VORTEX_HOME is set to the correct directory. See Using network initialization files to set network defaults.

If you are on a 64-bit Windows machine, it could be that the DSN has not been defined by the right version of the Microsoft ODBC Administrator. For example, if a 32-bit application is accessing a local database on a system with both 32-bit and 64-bit Synergy/DE, the DSN must be created by the 32-bit ODBC Administrator. For more information, see Adding a user or system DSN.