SQLError (core level only)

SQLError returns error or status information.

SQLError does not post error values for itself. SQLError returns SQL_NO_DATA_FOUND when it cannot retrieve any error information (in which case sqlstate equals 00000). If SQLError cannot access error values for any reason that would normally return SQL_ERROR, SQLError returns SQL_ERROR but does not post any error values. If the buffer for the error message is too short, SQLError returns SQL_SUCCESS_WITH_INFO but still does not return an SQLSTATE value for SQLError.

To determine that a truncation occurred in the error message, an application can compare cbErrorMsgMax to the actual length of the message text written to pcbErrorMsg.