SQLcode error code summary and sqlstate = 37000 Solutions

Source: Internet
Author: User
Tags driver manager sql server driver odbc connection odbc sql server driver

Today, when I used Power Designer to reverse the database for the second time, I encountered a problem:

Unable to list the users.

[Microsoft] [odbc SQL Server Driver] [SQL Server] cannot predefine statements

SQLSTATE = 37000

SQL Server2005 Chinese Version Www.33lc.com/soft/12358.html

After searching for half a day, we can solve the problem as follows. In the final analysis, an error occurs in the second step.

Solution:

Step 1: Find the DBMS of the PD, modify its DBMS configuration, select Database-> Change Current DBMS in the menu bar, and select SQL Server2005 for the DBMS.

  

Step 2: Modify the ODBC connection mode. Remember not to select the default database when using the Wizard to generate the System DSN.

Reconfigure ODBC connection, Administrative Tools-> data source ODBC-> Add in user DSN Tab option-> the selection box that appears to create a new data source, drag the scroll bar to the bottom, select SQL Srever. The new data source naming window is displayed. The name is BinODBC. In the server drop-down box, select a local database instance. Click Next> select SQL server verification with user ID and password> enter SQL user name and password> do not select the "change default database to" check box. Go to the next step and click Finish.

Step 3: Select File> Reverse Engineer> Database from PD

Step 4: select a database, select a table, and click OK.

SQL code

ODBC error message

According to the definitions in the X/Open and SQL Access Group SQL CAE specifications (1992), SQLERROR returns the SQLSTATE value. The SQLSTATE value is a string containing five characters. The following table lists the SQLSTATE values that the driver can return for SQLError.

The string value returned for SQLSTATE is composed of two character class values followed by three character subclass values. 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 that it is an error, followed by the return code of SQL _ERROR. Class IM is used to indicate warnings and errors generated from ODBC implementations. The subclass value 000 in any class is used to implement the conditions defined in the given class. The Assignment Method for this type value and subclass value is defined by the SQL-92.

The return value SQL _SUCCESS usually indicates that a function is successfully executed, but SQLSTATE 00000 also indicates that the function is successfully executed.

Sqlstate odbc api (driver manager) Error

00000 successful

01000 general warning

01002 disconnection Error

01004 data truncated

01006 remove privileges

01S00 invalid connection string feature

Error in line 01S01

01S02 option value changed

01S03 no row updated or deleted

01S04 updated or deleted multiple rows

01S05 canceled as FreeStmt/Close

01S06 try to extract before the result returns the first row set

07001 Incorrect Parameter count

07006 violation of Restricted Data Types

07S01 the default parameter usage is invalid.

08001 unable to connect to the data source

08002 connection in use

08003 connection not opened

08004 the data source rejects connection Establishment

08007 connection failed during transaction execution

08S01 communication link failed

21S01 the inserted Value List does not match the column list

The degree of the 21S02 derived table does not match the column list

22001 right truncation of string data

22002 indicator variables are required, but no

22003 numeric value out of range

22005 Allocation Error

22008 Datetime field Overflow

22012 zero Division Error

22026 string data, length Mismatch

23000 violation of integrity constraints

24000 * The cursor status is invalid.

25000 invalid transaction status

28000 invalid authorization Specification

34000 the cursor name is invalid.

37000 syntax error or illegal access -------------------------------- in the online help

Duplicate 3C000 cursor name

40001 serial errors

42000 syntax error or illegal access

70100 operation termination

IM001 driver does not support this function

IM002 source name not found and default driver not specified

IM003 cannot load the specified driver

SQLAllocEnv of IM004 driver failed

SQLAllocConnect of IM005 driver failed

SQLSetConnectOption of the IM006 driver failed

IM007 no data source or driver specified; Disable Dialog

IM008 dialog failed

IM009 cannot load the conversion DLL

IM010 the data source name is too long

IM011 driver name is too long

IM012 DRIVER keyword syntax error

IM013 trace file Error

S0001 base table or view already exists

S0002 no base table found

S0011 index already exists

S0012 index not found

Column S0021 already exists

Column S0022 not found

No default value for column S0023

S1000 common error

An error occurred while allocating the memory of the specified instance.

The number of the column in the column '100' is invalid.

The number of the program types in the specified value is exceeded.

The data type of the SQL statement is out of the range.

The operation has been canceled for S1008.

The parameter value of S1009 is invalid.

S1010 function sequence error

The S1011 operation is invalid at this time.

The transaction operation code specified by S1012 is invalid.

S1015 no available cursor name

Invalid S1090 string or buffer Length

S1091 descriptor type out of range

S1092 option type out of range

The S1093 parameter number is invalid.

The S1094 decimal point value is invalid.

The S1095 function type is out of range.

S1096 information type out of range

The S1097 column type exceeds the range.

S1098 scope type out of range

S1099 can be empty type out of range

S1100 unique option type out of range

S1101 accuracy option type out of range

S1103 direction option out of range

The S1104 precision value is invalid.

The S1105 parameter type is invalid.

S1106 extraction type out of range

The value of S1107 row exceeds the range.

The S1108 concurrency option is out of range

The cursor position of S1109 is invalid.

Invalid S1110 driver completion

The S1111 bookmarks are invalid.

S1C00 driver cannot be executed

S1DE0 execution value suspended without data

S1T00 expired

A very detailed summary of error codes, hoping to help you

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.