Switch to: V14V13V12V11V10V9V8V7V6V5

Properties of SqliteDatabase Class

This page contains properties that VSqliteDatabase class inherits from SqliteDatabase class of Xojo.



DatabaseFile as FolderItem


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

This property can be used only with LOCAL databases. Use DatabaseName for remote databases.


// This code connects to an existing SQLite database:
Dim db As New VSQLiteDatabase
Dim dbFile As FolderItem = GetOpenFolderItem("")
If dbFile <> Nil And dbFile.Exists Then
  db.DatabaseFile = dbFile
  If db.Connect Then
    MsgBox("Connected to database successfully!")
    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


Other properties of Database class work in 100% the same way, so we provide direct links to Xojo Docs about these properties: