Error Messages

When an error occurs, the KCML ODBC driver logs the native error number, the SQLSTATE (an ODBC error code), and an error message.

Native Error

For errors that occur in the server KISAM layer, the KISAM SQL engine on the server returns the native error. For errors that are detected by the ODBC driver the driver returns a native error of zero. Application programmers are stringly discouraged from using native errors directly and instead they should use the SQLSTATE.

SQLSTATE

All errors have an identifying 5 character SQLSTATE code as specified in the X/Open SAG specification and as listed in the Microsoft ODBC 2.0 Programmers reference.

Error Message

For errors that occur in the data source, the KCML ODBC driver returns an error message returned to it by the ODBC driver. For errors that occur in the KCML ODBC driver or the Driver Manager, the KCML ODBC driver returns an error message based on the text associated with the SQLSTATE.

ODBC error messages have the following format:

[vendor][ODBC-component][data-source]message-text

where the prefixes in brackets ([ ]) identify the location of the error. When the error occurs in the Driver Manager or SQL Engine, data-source is not given. When the error occurs in the data source, the [vendor] and [ODBC-component] prefixes identify the vendor and name of the ODBC component that received the error from the data source.

The following table shows the error messages returned by the Driver Manager, the server SQL Engine and the client driver.

Error Message Error location
[Kerridge][KCML ODBC Driver]message-text MS Driver Manager
(ODBC.DLL)
[Kerridge][KCML ODBC Driver]message-text ODBC driver on the client
[Kerridge][KCML ODBC Driver][KISAM]message-text KISAM SQL engine on the server