All Manuals > LispWorks User Guide and Reference Manual > 47 The SQL Package

NextPrevUpTopContentsIndex

sql-database-error

Condition
Package

sql

Superclasses

simple-error

Subclasses

sql-connection-error
sql-database-data-error
sql-temporary-error

Accessors

sql-error-error-id
sql-error-secondary-error-id
sql-error-database-message

Description

The condition class sql-database-error is used to signal errors in the database interface that Common SQL uses.

sql-error-error-id returns the primary error identifier. On ODBC the value is a string. On Oracle it is some number, the "v2 return code" in the Cursor Data Area.

sql-error-secondary-error-id returns the secondary error identifier. On ODBC this is the error code from the underlying database. On Oracle that is the "v4 return code" (also known as "return code") in the Cursor Data Area, which is the useful code.

sql-error-database-message is a string (maybe nil) that came back from the foreign code.

Notes

ODBC drivers for Oracle return the "v4 return code" as the underlying database code. Therefore in the event of an error on connection to an Oracle database, sql-error-secondary-error-id always returns the "v4 return code" whether the connection is through ODBC.

See also

sql-user-error


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex