Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


SQLSTATE Return Codes


SQLSTATE contains a 5-character long return code string that indicates the status of an SQL statement. These return codes are standardized following the established standards. Observe that not all standardized SQLSTATE return codes are used by Mimer SQL.

The SQLSTATE values consists of two fields. The class, which is the first two characters of the string, and the subclass, which is the terminating three characters of the string.

List of SQLSTATE Values

:

Class
Subclass
Meaning
00
000
Successful completion
01
000
Warning
01
002
- disconnect error
01
003
- null value eliminated in set function
01
004
- string data, right truncation
01
005
- insufficient item descriptor areas
01
006
- privilege not revoked
01
007
- privilege not granted
01
008
- implicit zero-bit padding
01
S01
- error in row
01
S02
- option value changed
01
S05
- cancel treated as close
01
S06
- attempt to fetch before the result set returned the first rowset
01
S07
- fractional truncation
02
000
No data
07
000
Dynamic SQL error
07
001
- using clause does not match dynamic parameter specifications
07
002
- using clause does not match target specifications
07
003
- cursor specification cannot be executed
07
004
- using clause required for dynamic parameters
07
005
- prepared statement is not a cursor specification
07
006
- restricted data type attribute violation
07
007
- using clause required for result fields
07
008
- invalid descriptor count
07
009
- invalid descriptor index
07
00F
- invalid DATETIME_INTERVAL_CODE
08
000
Connection exception
08
001
- client unable to establish connection
08
002
- connection name in use
08
003
- connection does not exist
08
004
- server rejected the connection
08
006
- connection failure
09
000
Triggered action exception
0A
000
Feature not supported
0B
000
Invalid transaction initiation
0K
000
Resignal when handler not active
0W
000
Prohibited statement encountered during trigger execution
21
000
Cardinality violation
21
S01
- insert value list does not match column list
21
S02
- degree of derived table does not match column list
22
000
Data exception
22
001
- string data, right truncation
22
002
- null value, no indicator parameter
22
003
- numeric value out of range
22
005
- error in assignment
22
006
- invalid interval format
22
007
- invalid datetime format
22
008
- datetime field overflow
22
011
- substring error
22
012
- division by zero
22
015
- interval field overflow
22
018
- invalid character value for cast
22
019
- invalid escape character
22
023
- invalid parameter value
22
024
- unterminated C string
22
025
- invalid escape sequence
22
026
- string data, length mismatch
22
027
- trim error
22
029
- noncharacter in UCS string
23
000
Integrity constraint violation
24
000
Invalid cursor state
25
000
Invalid transaction state
25
S03
- transaction is rolled back
26
000
Invalid SQL statement name
27
000
Triggered data change violation
28
000
Invalid authorization specification
2E
000
Invalid connection name
2F
000
SQL routine exception
2F
003
- prohibited SQL-statement attempted
2F
005
- function executed no return statement
33
000
Invalid SQL descriptor name
34
000
Invalid cursor name
35
000
Invalid condition number
37
000
Syntax error or access violation
in PREPARE or EXECUTE IMMEDIATE *
3C
000
Ambiguous cursor name
40
000
- transaction rollback
40
001
- serialization failure
42
000
Syntax error or access rule violation
42
S01
- base table or view already exists
42
S02
- base table or view not found
42
S11
- index already exists
42
S21
- column already exists
42
S22
- column not found
44
000
WITH CHECK OPTION violation
45
000
Unhandled user-defined exception
HY
000
General error
HY
001
- memory allocation error
HY
003
- invalid application buffer type
HY
004
- invalid SQL data type
HY
007
- associated statement is not prepared
HY
008
- operation canceled
HY
009
- invalid use of null pointer
HY
010
- function sequence error
HY
011
- attribute cannot be set now
HY
012
- invalid transaction operation code
HY
013
- memory management error
HY
014
- limit on the number of handles exceeded
HY
015
- no cursor name available
HY
016
- cannot modify an implementation row descriptor
HY
017
- invalid use of an automatically allocated descriptor handle
HY
018
- server declined cancel request SQLCancel
HY
019
- non-character and non-binary data sent in pieces
HY
020
- attempt to concatenate a null value
HY
021
- inconsistent descriptor information
HY
024
- invalid attribute value
HY
090
- invalid string or buffer length
HY
091
- invalid descriptor field identifier
HY
092
- invalid attribute/option identifier
HY
093
- invalid parameter number
HY
095
- function type out of range
HY
096
- invalid information type
HY
097
- column type out of range
HY
098
- scope type out of range
HY
099
- nullable type out of range
HY
100
- uniqueness option type out of range
HY
101
- accuracy option type out of range
HY
102
- table type out of range
HY
103
- invalid retrieval code
HY
104
- invalid precision or scale value
HY
105
- invalid parameter type
HY
106
- fetch type out of range
HY
107
- row value out of range
HY
108
- concurrency option out of range
HY
109
- invalid cursor position
HY
110
- invalid driver completion
HY
111
- invalid bookmark value
HY
C00
- optional feature not implemented
HY
T00
- timeout expired
HY
T01
- connection timeout expired
IM
000
ODBC specific return codes
IM
001
- driver does not support this function
IM
008
- dialog failed
S0
000
ODBC 2.0 codes *
S0
001
- base table or view already exists *
S0
002
- base table not found *
S0
011
- index already exists *
S0
012
- index not found *
S0
021
- column already exists *
S0
022
- column not found *
S1
000
General error
S1
001
- memory allocation failure
S1
002
- invalid column number
S1
003
- program type out of range
S1
004
- SQL data type out of range
S1
008
- operation canceled
S1
009
- invalid argument value
S1
010
- function sequence error
S1
012
- invalid transaction operation code specified
S1
090
- invalid string or buffer length
S1
091
- descriptor type out of range
S1
092
- option type out of range
S1
093
- invalid parameter number
S1
095
- function type out of range
S1
096
- information type out of range
S1
097
- column type out of range
S1
098
- scope type out of range
S1
099
- nullable type out of range
S1
100
- uniqueness option out of range
S1
101
- accuracy option type out of range
S1
102
- table type out of range
S1
105
- direction option out of range
S1
106
- fetch type out of range
S1
107
- row value out of range
S1
108
- concurrency option out of range
S1
109
- invalid cursor position
S1
C00
- driver not capable
S1
T00
- timeout expired

* Return code will only be returned to ODBC applications executing in ODBC 2.0 mode.

Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX