Database.ErrorCode
From Xojo Documentation
This item was deprecated in version 2019r2. Please use DatabaseException as a replacement. |
Read-Only Property (As Integer )
The error code returned from the database. Error codes and error messages are different for each database.
Notes
You should check the Error property after each database operation to see if there was an error. If there is an error, you can display or log the ErrorCode and ErrorMessage.
- SQLite error codes
- PostgreSQL error codes
- MySQL error codes
- Oracle error codes
- MS SQL Server error codes: SELECT * FROM SYS.MESSAGES
Sample Code
This code attempts to create an in-memory SQLite database and displays the error if one occurred: