Property

Database_Class.Error


Warning

This item was deprecated in version 2019r2. Please use DatabaseException as a replacement.

Description

True if an Error is returned from the database engine. See the values of the ErrorCode and ErrorMessage properties to learn the specifics of the Error.

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.

Sample code

This code attempts to create an in-memory SQLite database and displays the Error if one occurred:

Dim db As New SQLiteDatabase
If db.Connect Then
  ' Connected to in-memory database
Else
  If db.Error Then
    MsgBox("Error: " + Str(db.ErrorCode) + " - " + db.ErrorMessage)
  End If
End If

Compatibility

All project types on all supported operating systems.