From Xojo Documentation


iOSSQLiteDatabase.Connect() As Boolean

Supported on Mobile(iOS).

Connects to the database so that you can begin using it. Before proceeding with database operations, test to be sure that Connect returns True.


To create an in-memory SQLite database, call Connect without having previously specified a DatabaseFile.

Sample Code

Connect to an existing database:

Dim db As New iOSSQLiteDatabase

Dim dbFile As FolderItem
dbFile = SpecialFolder.Documents.Child("MyDB.sqlite")

If dbFile.Exists Then
db.DatabaseFile = dbFile
If db.Connect Then
// proceed with database operations here...
Dim err As Text = "Could not open the database."
End If
End If