MDAC 2.5 SDK - Visual FoxPro ODBC Driver


 

SQLError

Support: Full  
ODBC API Conformance: Core Level

Returns error or status information about the last error. The driver maintains a stack or list of errors that can be returned for the hstmt, hdbc, and henv arguments, depending on how the call to SQLError is made. The error queue is flushed after each statement.

The following table describes the SQLError arguments and return values used by the driver.

SQLError argument Return value description
szSQLState The value for the SQLSTATE represented by the error.
pfNativeError A nonzero value indicates a Visual FoxPro ODBC Driver Native Error Message. A value of zero indicates the error has been detected by the driver and mapped to the appropriate ODBC Error Code.
szErrorMsg The text for the native error or ODBC error.
pcbErrorMsg The length of the message text plus the length of the identifiers.

For more information on driver error messages, see Error Messages Overview. For more information about this function, see SQLError in the ODBC Programmer's Reference.