Syntax
SQLErrorText$(ErrorNum)
Remarks
Retrieves a row of available error information. SQLErrorText$ returns a single string that contains a delimited list of error information that can be evaluated by an error trap or displayed to the user.
Argument | Explanation |
ErrorNum | A row number between 1 and the value returned by the SQLCountErrors function (1 is the first available item). |
Each row of error information has the following four fields:
If one or more of these fields is not available for the type of error that was encountered, those fields are left blank. For more information about ODBC error messages, see the Microsoft ODBC Programmer's Reference in the Microsoft ODBC Software Development Kit version 2.10. For information about specific return values, see the Help file for the appropriate ODBC driver.
Example
The following example demonstrates a simple loop for displaying error information to the user in a message box. After the number of lines of error information is returned by SQLCountErrors, a For¼Next loop displays the errors.
count = SQLCountErrors() for msgs = 1 to count MsgBox SQLErrorText$(count), "ODBC Error", 48 next count