SQLiteDatabase.DatabaseFile

From Xojo Documentation

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

Supported for all project types and targets.

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

Example

This code connect to an existing SQLite database:

Dim db As New SQLiteDatabase

Dim dbFile As FolderItem = GetOpenFolderItem("")

If dbFile <> Nil And dbFile.Exists Then
db.DatabaseFile = dbFile

If db.Connect Then
MsgBox("Connected to database successfully!")
Else
MsgBox("DB Connection Error: " + db.ErrorMessage)
End If
End If

This code creates an in-memory database that you can use for storing temporary data:

Dim db As New SQLiteDatabase
If db.Connect Then
// Create tables and add data as necessary.
End If