iOSSQLiteDatabase.DatabaseFile

From Xojo Documentation

Property (As FolderItem )
aiOSSQLiteDatabase.DatabaseFile = newFolderItemValue
or
FolderItemValue = aiOSSQLiteDatabase.DatabaseFile

Supported on Mobile (iOS).

Specifies the FolderItem for the SQLite database file. If DatabaseFile is Nil, calling the Connect method creates an in-memory database.

Sample Code

Connect to an existing database:

Var db As New iOSSQLiteDatabase

Var 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...
Else
Var err As Text = "Could not open the database."
End If
End If