From Xojo Documentation

Revision as of 19:51, 22 August 2018 by PLefebvre (talk | contribs) (Created page with "{{MethodBox | name = CreateDatabaseFile | ownertype = class | scope = public | parameters = | owner = iOSSQLiteDatabase | returntype = Boolean | project=Mobile | targ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

iOSSQLiteDatabase.CreateDatabaseFile() As Boolean

Supported on Mobile(iOS).

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


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...
Dim err As Text = "Database could not be created."
End If