iOSSQLiteDatabase.CreateDatabaseFile

From Xojo Documentation

Method

iOSSQLiteDatabase.CreateDatabaseFile() As Boolean

Supported on Mobile(iOS).

Creates a database file. Returns True if the database was successfully created.

Notes

You are automatically connected if CreateDatabase returns True, so you do not need to also call Connect.

Sample Code

Create a New iOSSQLiteDatabase:

Var dbFile As FolderItem
dbFile = SpecialFolder.Documents.Child("MyDB.sqlite")

Var db As New iOSSQLiteDatabase
db.DatabaseFile = dbFile
If db.CreateDatabaseFile Then
' proceed with database operations here...
Else
Var err As Text = "Database could not be created."
End If