Database.Error

From Xojo Documentation
Jump to: navigation, search
Property (As boolean)
The property is read-only.

booleanValue = aDatabase.Error

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.

Example

This example attempts to create an in-memory 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
Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About