Used to signal errors in the database interface.
sql
sql-connection-error
sql-database-data-error
sql-failed-to-connect-error
sql-temporary-error
sql-error-error-id
sql-error-secondary-error-id
sql-error-database-message
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.
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.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56