The error messages returned by the IDL DataMiner follow the ODBC standard error message format as outlined in the ODBC Software Development Kit. ODBC error messages use one of the following formats, depending on whether the VERBOSE property is set on the database (seeIDLdbDatabase::SetProperty for a description of the VERBOSE property.)

Standard Messages


If the VERBOSE property is set equal to zero (the default), the error message has the form:

[vendor-identifier] [ODBC-component-identifier]
[data-source-identifier] data-source-text, component-text

where

[vendor-identifier] shows the vendor of the component in which the error occurred, or that received the error directly from the data source.

[ODBC-component-identifier] shows the component in which the error occurred, or that received the error directly from the data source.

[data-source-identifier] shows the data source in which the error occurred.

data-source-text is the text generated by the data source, if the error occurred in a data source.

component-text is the text generated by the ODBC component, if the error occurred in an ODBC component.

Verbose Messages


If the VERBOSE property is set equal to one, the following fields precede the standard error message:

SQL Function=<function name>, STATE=<state number>,
  CODE=<error code>

where

<function name> is the actual ODBC C function that triggered the error. This information is needed for the interpretation of the STATE error code.

<state number> is a 5 character string that defines an error code returned from the ODBC system. This code along with the SQL Function name can be used to determine the actual cause of the ODBC error.

<error code> is the error code returned from the data source. This code is a native error of the datasource and describes the error condition that the datasource detected.

For example, a standard error message from a data source might look like this:

% IDLDBDATABASE::CONNECT: ODBC [Microsoft]
  [ODBC SQL Server Driver][netlibtcp]
  ConnectionOpen (connect()).

The verbose error message for the same error:

% IDLDBDATABASE::CONNECT: ODBC
  SQL Function=SQLDriverConnect, STATE=01000,
  CODE=146,[Microsoft][ODBC SQL Server Driver]
  [netlibtcp] ConnectionOpen (connect()).