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:

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

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