short GetLastErrorType()
Description
This function returns the type of the most recent error. If you call GetLastErrorType() after a function that executed successfully, then this API returns information about the last error that occurred during a prior function call. To avoid confusion, always call GetLastErrorType() immediately after calling a function that returned an error.
Return Value
The number returned indicates the type of error:
|
|
---|---|
0 (RS_ERROR_NONE) | No errors have occurred since the QMF for Windows API object was created. |
1 (RS_ERROR_SQL) | An SQL error occurred. If the error occurred during a call to a function that takes QueryID as an argument, call Close() to close that query. No rollback is performed. You can continue to use the QMF for Windows API object, although you may encounter additional errors. |
2 (RS_ERROR_USER_CANCEL) | A user cancelled the operation, usually by clicking Cancel on the busy window. This causes QMF for Windows to perform an implicit rollback (invalidating all outstanding query IDs) and destroy the connection to the database. Call InitializeServer() or ReinitializeServer() to continue. |
3 (RS_ERROR_FATAL_GOV) | A fatal governor error occurred. One possibility is that the QMF for Windows API timed out because the maximum allowable idle time was exceeded. This causes QMF for Windows to perform an implicit rollback (invalidating all outstanding query IDs) and destroy the connection to the database. Call InitializeServer() or ReinitializeServer() to continue. |
4 (RS_ERROR_NONFATAL_GOV) | A non-fatal governor error occurred. Either the maximum allowable number of rows to fetch was exceeded, or the SQL verb is not allowed. If the error occurred during a call to a function that takes QueryID as an argument, call Close() to close that query. No rollback is performed and the connection to the database is unaffected. You can continue to use the QMF for Windows API object. |
5 (RS_ERROR_OTHER) | A general error occurred. No rollback is performed. You can continue to use the QMF for Windows API object, although you may encounter additional errors. |
Related Tasks