SQLError

This function returns the diagnostic information associated with the most recently called function.

Syntax :

RETCODE SQLError( henv, hdbc,hstmt sqlState, nativeErr, errMsg, errMsgMax, pcbErrMsg);

Arguments :

The arguments for SQLError are listed in below table.

TypeNameDescription
SQLHENVhenvEnvironment handle. To obtain diagnostic information associated with an environment
SQLHDBChdbcDatabase connection handle. To obtain diagnostic information associated with a connection
SQLHSTMThstmtStatement handle. To obtain diagnostic information associated with a statement, pass a valid statement handle. The henv and hdbc arguments are ignored.
SQLCHAR*sqlStateSQLSTATE as a string of 5 characters terminated by a null character. The first 2 characters indicate error class; the next 3 indicate subclass.
SQLINTEGER*nativeErrNative error code
SQLCHAR*errMsgPointer to buffer to contain the implementation defined message text.
SQLSMALLINTerrMsgMaxMaximum (that is, the allocated) length of the buffer errMsg
SQLSMALLINT*pcbErrMsgPointer to total number of bytes available to return to the errMsg buffer.
Page last modified on September 26, 2009, at 01:51 AM