Error Messages

This appendix describes all errors of DB-Library for Visual Basic and their levels of severity. These values are passed to a user-defined error handler. For information on creating an error handler for your application, see Programming with DB-Library for Visual Basic.

The text of the DB-Library for Visual Basic error messages comes from the underlying DB-Library, which is a library for developing client applications in C. As a result, some of the messages are specific to the DB-Library. In these cases, a version of the message that more accurately describes the error for DB-Library for Visual Basic is included in the entry.

The following table lists the DB-Library for Visual Basic errors, providing the error number, the error constant, and the error message for each error. The constants are defined in the VBSQL.BAS file.

Number Constant Error message
10000 SQLEMEM Unable to allocate sufficient memory.
10001 SQLENULL NULL DBPROCESS pointer encountered. For Visual Basic: A sqlconn identifier with a value of 0 was encountered.
10002 SQLENLOG NULL LOGINREC pointer encountered. For Visual Basic: A loginrec% with a value of 0 was encountered.
10003 SQLEPWD Login incorrect.
10004 SQLECONN Unable to connect: SQL Server is unavailable or does not exist.
10005 SQLEDDNE DBPROCESS is inactive or not enabled. For Visual Basic: SQL Server connection is dead.
10006 SQLNULLO Attempt to log in with null LOGINREC. For Visual Basic: Attempt to log in with a loginrec value of 0.
10007 SQLESMSG General SQL Server error: Check messages from the SQL Server.
10008 SQLEBTOK Bad token from SQL Server: datastream processing out of sync.
10009 SQLENSPE Non-specific general error.
10010 SQLEREAD Read from SQL Server failed.
10011 SQLECNOR Column number out of range.
10012 SQLETSIT Attempt to call dbtsput with an invalid timestamp. For Visual Basic: Attempt to call SqlTsPut% with an invalid timestamp.
10013 SQLEPARM Invalid parameter in DB-Library function reference.
10014 SQLEAUTN Attempt to update the timestamp of a table that has no timestamp column.
10015 SQLECOFL Data-conversion resulted in overflow.
10016 SQLERDCN Requested data conversion does not exist.
10017 SQLEICN Invalid computeid or compute column number.
10018 SQLECLOS Error in closing network connection.
10019 SQLENTXT Attempt to get text point/timestamp from a non-text column. For Visual Basic: Attempt to get a text identifier or text timestamp from a non-text column.
10020 SQLEDNTI Attempt to use dbtxtsput to put a new text timestamp into a column whose datatype in neither SQLTEXT nor SQLIMAGE. For Visual Basic: Attempt to use SqlTxTsPut% to put a new text timestamp into a column whose datatype is neither text nor image.
10021 SQLETMTD Attempt to send too much TEXT data via the dbmoretext call. For Visual Basic: Attempt to send too much text data using SqlMoreText%.
10022 SQLEASEC Attempt to send an empty command buffer to SQL Server.
10023 SQLENTLL Name too long for LOGINREC field.
10024 SQLETIME SQL Server connection timed out.
10025 SQLEWRIT Write to SQL Server failed.
10026 SQLEMODE Network connection not in correct mode; invalid SQL Server connection.
10027 SQLEOOB Error in sending out-of-band data to SQL Server.
10028 SQLEITIM Illegal timeout value specified.
10029 SQLEDBPS Maximum number of DBPROCESSes already allocated. For Visual Basic: Invalid or out-of-range parameter to a Visual Basic option.
10030 SQLEIOPT Attempt to use invalid DBOPTION. For Visual Basic: Attempt to use invalid Visual Basic option.
10031 SQLEASNL Attempt to set fields in a null LOGINREC. For Visual Basic: Attempt to set fields in a login record with loginrec value of 0.
10032 SQLEASUL Attempt to set unknown LOGINREC field.
10033 SQLENPRM NULL parameter not allowed for this DBOPTION. For Visual Basic: This Visual Basic option cannot have a parameter that is an empty string.
10034 SQLEDBOP Invalid or out of range dbn option parameter. For Visual Basic: Invalid or out-of-range parameter to a Visual Basic option.
10035 SQLENSIP Negative starting index passed to dbstrcpy. For Visual Basic: Negative starting index passed to SqlStrCpy%.
10036 SQLECNULL NULL destination variable not allowed. For Visual Basic: You have used 0 as an identifier for a text timestamp.
10037 SQLESEOF Unexpected EOF from SQL Server.
10038 SQLERPND Attempt to initiate a new SQL Server operation with results pending.
10039 SQLECSYN Attempt to convert data stopped by syntax error in source field.
10040 SQLENONET DB-Library network communications layer not loaded.
10041 sqlebtyp Unknown bind type passed to DB-Library function.
10042 sqleabnc Attempt to bind to a non-existent column.
10043 sqleabmt User attempted a dbbind with mismatched column and variable types.
10044 sqleabnp Attempt to bind using NULL pointers.
10045 sqleabncr Attempt to bind user variable to a non-existent compute row.
10046 slqeaamt User attempted a dbaltbind with mismatched columns and variable datatypes.
10047 SQLENXID The server did not grant us a distributed-transaction ID.
10048 sqleifnb Illegal field number passed to bcp_control.
10049 SQLEKBCO 1000 rows successfully copied to host file.
10050 SQLEBBCI Batch successfully copied to SQL Server.
10051 SQLEKBCI 1000 rows sent to SQL Server.
10052 SQLEBCWE I/O error while writing a bcp datafile.
10053 SQLEBCNN Attempt to copy a null value into a server column that does not accept null values.
10054 SQLEBCOR Attempt to bulk copy an oversized row to SQL Server.
10055 SQLEBCPI Call BCPInit before any other BCP routines. For Visual Basic: Call SqlInit$ before any other BCP routines.
10056 sqlebcpn Use bcp_bind, bcp_collen, and bcp_colptr only after calling bcp_init with the copy direction set to DB_IN.
10057 sqlebcpb Do not use bcp_bind after bcp_init has been passed a non-null input filename.
10058 SQLEVDPT For bulk copy, all variable-length data must have either a length-prefix or a terminator specified.
10059 SQLEBIVI Use bcp_columns and bcp_colfmt only after bcp_init has been passed a valid input file. For Visual Basic: Use SqlBCPColumns% and SqlBCPColfmt% only after SqlInit$ has been passed a valid input file.
10060 SQLEBCBC Call bcp_columns before bcp_colfmt. For Visual Basic: Call SqlBCPColumns% before SqlBCPColfmt%.
10061 SQLEBCFO Host files must contain at least one column: bcp.
10062 SQLEBCVH Call bcp_exec only after bcp_init has been passed a valid host file. For Visual Basic: Call SqlBCPExec% only after SqlBCPInit% has been passed a valid host file.
10063 SQLEBCUO Unable to open host datafile: bcp.
10064 SQLEBUOE Unable to open error file: bcp.
10065 SQLEBWEF I/O error while writing bcp error file.
10066 SQLEBTMT Attempt to send too much text data with bcp_moretext.
10067 SQLEBEOF Unexpected EOF encountered in bcp datafile.
10068 SQLEBCSI Host-file columns can be skipped only when copying into the server.
10069 sqlepnul NULL program pointer encountered.
10070 SQLEBSKERR Cannot seek in data file.
10071 SQLEBDIO Bad bulk-copy direction.
10072 SQLEBCNT Attempt to use bulk copy with a nonexistent server table.
10073 sqlemdbp Attempt to set maximum number of DBPROCESSes lower than 1.
10075 SQLCRSINV Invalid cursor statement.
10076 SQLCRSCMD Attempt to call cursor functions when there are commands waiting to be executed.
10077 SQLCRSNOIND One of the tables involved in the cursor statement does not have a unique index.
10078 SQLCRSDIS Cursor statement contains one of the disallowed phrases COMPUTE, UNION, FOR BROWSE, or SELECT INTO.
10079 SQLCRSAGR Aggregate functions are not allowed in a cursor statement.
10080 SQLCRSORD Only fully keyset driven cursors can have ORDER BY, GROUP BY, or HAVING PHRASES.
10081 SQLCRSMEM Keyset or window scroll size exceeds the memory limitations of this machine.
10082 SQLCRSBSKEY Keyset cannot be scrolled backward in mixed cursors with a previous fetch type.
10083 SQLCRSNORES Cursor statement generated no results.
10084 SQLCRSVIEW A view cannot be joined with another table or a view in a cursor statement.
10085 SQLCRSBUFR Row buffering should not be turned on when using cursor functions.
10086 SQLCRSFROWN Row number to be fetched is outside valid range.
10087 SQLCRSBROL Backward scrolling cannot be used in a forward scrolling cursor.
10088 SQLCRSFRAND Fetch types RANDOM and RELATIVE can only be used within the keyset of keyset driven cursors.
10089 SQLCRSFLAST Fetch type LAST requires fully keyset driven cursors.
10090 SQLCRSRO Data locking or modifications cannot be made in a READONLY cursor.
10091 SQLCRSTAB Table name must be determined in operations involving data locking or modifications.
10092 SQLCRSUPDTAB Update or insert operations using bind variables require single table cursors.
10093 SQLCRSUPDNB Update or insert operations cannot use bind variables when binding type is NOBIND.
10094 SQLCRSVIIND The view used in the cursor statement does not include all the unique index columns of the underlying tables.
10095 SQLCRSNOUPD Update or delete operation did not affect any rows.
10096 SQLCRSOS2 Cursors are not supported for this server.
10097 SQLEBCSA The BCP hostfile %s contains only %ld rows. Skipping all of these rows is not allowed.
10098 SQLEBCRO Data locking or modifications cannot be made in a READONLY cursor.
10099 SQLEBCNE The table %s contains only %ld rows. Copying up to row %ld is not possible.
10100 SQLEBCSK The table %s contains only %ld rows. Skipping all of these rows is not allowed.
10101 SQLEUVBF Attempt to read unknown version of bcp format file.
10102 SQLEBIHC Incorrect host-column number found in bcp format file.
10103 SQLEBWFF I/O error while reading bcp format file.
10104 SQLNUMVAL The data stored in the DBNUMERIC/DBDECIMAL structure is invalid.
10105 SQLEOLDVR The SQL Server's TDS is obsolete with this version of DB-Library.