ODBC error message
The SQLERROR returns the SQLState value based on the definition of the X / Open and SQL Access Group SQL CAE specification (1992). The SQLSTATE value is a string containing five characters. The following table lists the SQLState values that the driver can return to SQLError.
The string values returned for SQLState consist of three characters of subclass values by the class values of the two characters. Class value 01 indicates a warning, followed by the return code of SQL_SUCCESS_WITH_INFO. As long as the class value is not 01 (except IM), it indicates an error, followed by the return code of SQL_ERROR. Class IM is specifically used to indicate warnings and errors generated from ODBC. Any class neutrical value 000 is used to implement the conditions defined in a given class. This type of value and subclass value are defined by SQL-92.
Normally, a function is successfully executed by the return value SQL_SUCCESS, but SQLState 00000 also shows successful execution.
SQLSTATATEODBC API (Driver Manager) Error 00000 Success 01000 General Warning 01002 Disconnect Error 01004 Data Truncated 01006 Unfair privileged 01S00 Invalid Connection String Characteristics 01S01 The error 01S02 option value has changed 01s03 Unreported or deleted any line 01S04 update or delete multi-line 01S05 cancel operation is used as freestmt / close01s06 to try to return the first rowner before extract 07001 parameter number error 07006 Violation of restricted data type characteristics 07S01 Default parameter use invalid 08001 Unable to connect to data Source 08002 connection is using the 08003 connection Open 08004 Data Source Refuse to establish connection 08007 During the execution of the transaction, the connection failed 08S01 communication link failed 21S01 Insert value list and column list does not match 21S02 derived deeper level and column list does not match 22001 strings Data Right Truncation 22002 requires an indicator variable, but does not provide 22003 digital value overhead range 22005 assignment error 22008DateTime field overflow 22012 is zero-divided error 22026 string data, length does not match 23000 violation Integrity constraint 24000 * invalid cursor state 25000 invalid Transaction Status 28000 Invalid Authorization Code 34000 Invalid Cursor Name 37000 Syntax Errors or Violation Access 3C000 Repeatable Cursor Name 40001 Serial Error 42000 Syntax Errors or illegal Access 70100 Operation Termination IM001 Driver Does Not Supporting this function IM002 Did not find the source name and Und Specifies the default driver IM003 Unable to load the specified driver IM004 driver SQLAllocenv failed IM005 driver SQLLOCCONNECT failed IM006 driver SQLSETCONNECTOTION failed IM007 Und specified data source or driver; Prohibition of conversation IM008 dialog failed IM009 Unable to load DLLIM010 data Source name excessive IM011 driver name excessive IM012Driver keyword syntax error IM013 trace file error S0001 base table or view existing S0002 Did not find the base Table S0011 index existing S0012 Did not find the index S0021 list existing S0022 Did not find the column S0023 column Default S1000 General Error S1001 Memory Allocation Failed S1002 Column Number Invalid S1003 Program Type Over the Range S1004SQL Data Type Over the Range S1008 Canceled S1009 Parameter Value Invalid S1010 Function Sequence Error S1011 Operation At this time, the transaction operation code specified by the invalid S1012 is invalid S1015 No available cursor name 1090 string or buffer length invalid S1091 Descriptor Type Benefits S1092 Option Type Benefits S1093 Parameter Number Invalid S1094 Digital Numerical Invalid S1095 Function Type Out of Range S1096 Information Type Beyond Range S1097 Column Type Beyond Range S1099 S1099 Can be empty type beyond range S1100 uniqueness option type exceeded range S1101 Accuracy option Type Benefits S1103 Direction option Benefits S1104 Accuracy Value S1105 Parameter Type Invalid S1106 Extraction Types Over Range S1107 Value Overrout Range S1108 Concurrent Election Overrout Range S1109 Castron Location invalid S1110 driver Complete Valid S1111 Bookmark Value Invalid S1C00 Driver Unable to perform S1DE0 Perform value Separation No data S1T00 timeout failure * In SQL Server Enterprise Manager, when trying to save the selected table or save the database relationship, if Microsoft® SQL ServerTM is exhausted, and the "Cursor Status" error message may be received. Returning this error is that the space of the database or transaction log is insufficient and the save process cannot be complete. To correct this problem, check if the database or transaction log is full. If it is full, add the size of the database to accommodate changes. Please check other system resources or contact your system administrator.
In addition to the standard ODBC error message in the ODBC programmer reference document, the SQL Server ODBC driver returns an error message for some SQLState values, as shown in the following table.
SQLSTATESQL Server Driver Error Description 01000 has sent% LD line to SQL Server. A total of:% LD line. Using the BCP API, a number of rows have been sent to SQL Server. 01000 successfully made a large capacity replication, and the% LD line has been copied to the main file. A total of:% LD line. Using the BCP API, a number of lines have been written to the primary file. 01000 has rejected access to the database configured in the DSN. Use the default value. The database does not exist, or the user does not have access to the database. Use the default database configured for login ID. 01000 Error when trying to access the log file, disable logging. Unable to use the driver statistics or long query log files. A log record of the driver statistics or long query has been disabled. 01000 Connect to the backup server. The SQL Server primary server is not available, so connect to the backup server. 01000 does not support the language configured in the DSN. Use the default value. The language name is invalid, or the language is not installed on the server. Used the default language configured for the login ID. 01000 NULL bit data is forced to zero. The bit field containing NULL is loaded into a server that does not support NULL bit data. This field is set to zero. The 01000 is executed with 'exec'. No output parameters are returned. Unable to execute the RPC, and the output parameters are specified. Because the process has been executed with EXEC, no output parameters will not store. 01000 Disables SQL debugging. Unable to enable SQL debugging, because SQL Server is configured without SQL debugging. 01000 The version of the ODBC directory stored procedure installed on the% S server is% s; to ensure proper operation,% 02D.% 02d.% 4.4d version or higher. Please contact your system administrator. Install the ODBC directory stored procedure by performing /msqql/install/instcat.sql. 01000 is forced to zero length to 1. Zero length binary or character field is being loaded, but zero length data is not supported. The field is forced to 1 byte space or binary zero. The 01S02 cursor concurrently changed. Because of the type of request or query, the application requests to be unable to follow. Generation to use another concurrent. The 01s02 cursor type has been changed. Because of the type of request or query, the application requests the type of cursor that cannot be observed. Generation to use another cursor type. The 01S02 server does not comply with the data packet size change, using the server size. The application requests non-default packet size that cannot be supported by SQL Server. Generation to use the server default size. 01S02 Packet size has been changed. The application requests non-default packet size, exceeding the allowed size limit. Depending on the size of the requested, it is too small, and in order to use the smallest or maximum data packet size. 01S02 login timeout has been changed. The application requests an overhang login timeout. In order to use the largest login timeout. 07006 does not allow conversion using BCP_MoreText. Applications with BCP_MoreText and column types must have the same field type. 08004 server rejects the connection; rejected access to the selected database. The database does not exist, or the user does not have access to the database. 08004 Server refuses to connect; does not support the specified language. The language name is invalid, or the language is not installed on SQL Server. The HY024 database is invalid or cannot be accessed. The database does not exist, or the user does not have access to the database. The IM006 server does not support packet size changes, use the default value. The application requests non-default packet size that SQL Server is not supported. Use the customer's default size. All bindings of HY000 are read-only. Must be upgraded to use SQLSETPOS or SQLBULKOPERATIONS to change or insert rows. HY000 has been detected an old NetLib (% s). Please delete and restart your application. Netlib being loaded has expired. The driver requests a newer NetLib.
The problem may be in the application's NetLib in the current directory, is loading this NetLib, not the one in the system directory. It may also be that the NetLib is not installed or corrupted. If the NetLib specified in the error text is exported to other places outside the Windows system directory, delete it. If NetLib only exists in the system directory, install the customer utility at the client, then restart the application. The HY000 attempts to copy the NULL value larger capacity to the Server column that does not accept the NULL value. The field contains a NULL value, but the column does not allow NULL values. The HY000 attempts will be copied to the excessive large capacity to SQL Server. The length provided for the column is greater than the column definitions in the table. The HY000 attempts to read an unknown version of the BCP format file. The title line in the BCP format file uses an unrecognizable version. Large-capacity replication direction of HY000 errors. Must be IN or OUT. BCP_INIT calls do not specify a valid direction for the eDirection parameter. HY000 error terminator. The terminator provided in BCP_BIND is invalid. The HY000BCP main file must contain at least one column. Any column to be loaded is not selected. The HY000 cannot generate the SSPI context. The driver cannot obtain the SSPI context required for integrated security. This unit error will contain the Win32 error code. The HY000 cannot initialize the SSPI package. The driver cannot obtain the SSPI context required for integrated security. This unit error will contain the Win32 error code. The HY000 communication module is invalid. The driver is not installed correctly. The network library.dll is corrupt. Install the customer utility at the client and restart the application. The HY000 is busy, and the result is for another HSTMT. The SQL Server ODBC driver only allows an active HSTMT. For more information, see Using the default result set. The HY000 is not enabled for BCP. The application using the BCP API must set SQLSETCONNECTATTAT or SQL_SS_COPT_BCP characteristics before the connection. The HY000 is closed when the connection is turned off. The ConnectionClose function in the network library failed. This problem is usually caused by the network or SQL Server problem. HY000 For BCP, the HY000 must specify a length prefix or terminator for all variable length data. BCP_BIND is called with SQL_Varylen_Data, but the prefix length or terminator is not specified. The HY000 can only skip the primary file column only when copying to the server. The BCP OUT format file specifies that the column should be skipped. This designation is not allowed. Create a view that contains only the BCP OUT of the required columns and the view, or provides a SELECT statement that only selects the desired column using the -q flag. The HY000 finds an incorrect primary column number in the BCP format file. The column number included in the format file is greater than the number of columns in the table. The HY000 has an I / O error when reading the BCP data file. HY000 has an I / O error when reading the BCP format file. The I / O error occurs when HY000 is written to the BCP data file. The HY000 has an I / O error when writing to the BCP error file. HY000 invalid options. The EOPTION parameter to BCP_Control is invalid. Non-default parameters are not allowed later by the default parameters. After any used default, the parameters of the stored procedures cannot be non-default. The HY000 does not have enough lists. For BCP OUT, all columns of unbound tables. Create a view that contains only the BCP OUT of the required columns and the view, or provides a SELECT statement that only selects the desired column using the -q flag. The HY000ODBC BCP / driver version does not match. SQLSRV32.DLL and ODBCBCP.DLL .DLL do not have the same version. Install the customer utility at the client and restart the application. A protocol error occurs in the HY000TDS stream. The server's TDS stream is invalid. This problem is generally caused by SQL Server issues. Check the SQL Server error log. The number of rows contained in the HY000 table is less than the first line count.