From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from Object)

Provides access to SQLite databases in iOS projects.

DatabaseFile LibraryVersion fa-lock-32.png Timeout
EncryptionKey ThreadYieldInterval
AttachDatabase Decrypt LastRowID
Connect DetachDatabase SQLExecute
CreateDatabaseFile Encrypt SQLSelect


Version used:

Xojo Version SQLite Version
2019r3 3.29.0
2019r2 3.28.0
2019r1 3.26.0
2018r4 3.25.3
2018r3 3.24.0
2018r2 3.23.1
2018r1 3.22.0
2017r3 3.20.1

For more information about SQLite:

If your database object goes out of scope, the database is closed. This means you are typically going to want your database object be somewhat global to your app. A common technique is to have an iOSSQLiteDatabase property on the App object that you refer throughout your app as App.DB.


iOSSQLiteDatabase does an auto-commit after each SQL command if you do not manually start a transaction. You can start a transaction using this command:


When the transaction is complete, you commit your changes with this command:


You can cancel a transaction by calling rollback with this command:


See Also

iOSSQLiteDatabaseField, iOSSQLiteException, iOSSQLiteRecordSet classes