Table of Contents
Properties of SqliteDatabase Class
This page contains properties that VSqliteDatabase class inherits from SqliteDatabase class of Xojo.
VSqliteDatabase.DatabaseFile
Declaration:
DatabaseFile as FolderItem
Description:
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.
Example:
// 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!") Else MsgBox("DB Connection Error: " + db.ErrorMessage) End If End If
Example:
// 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
Others
Other properties of Database class work in 100% the same way, so we provide direct links to Xojo Docs about these properties:
- VSqliteDatabase.EncryptionKey – TODO.