SQLErrorMsg() function
- Last UpdatedJun 17, 2024
- 1 minute read
All SQL functions return a result code that can be used for troubleshooting. The SQLErrorMsg() function returns the error message associated with the result code and assigns it as the value of an InTouch message tag.
Category
SQL
Syntax
ErrorMsg = SQLErrorMsg(ResultCode);
Argument
Result Code
Integer value returned by a previous SQL function. The SQLErrorMsg() function sets the value of an InTouch message tag to the message associated with the result code. For more information about error messages associated with result codes, see Understanding SQL Error Messages.
Remarks
Refer to your database documentation for undocumented result codes. Also, browse the Log Viewer for any additional error messages.
The SQLTrace=1 flag defined under the [InTouch] section of the win.ini file is useful for debugging SQL Access scripts.
Example
This example assigns the error message associated with the SQL Access Manager result code to the ErrorMsg message tag.
ErrorMsg = SQLErrorMsg(ResultCode)
See Also
SQLConnect()