Public Sub InitializeDatabase
If Database.IsInitialized = False Then
If File.Exists(File.DirInternal,"MyDatabase.db") = True Then
Database.Initialize(File.DirInternal,"MyDatabase.db",False)
Return
End If
If File.Exists(File.DirInternal,"MyDatabase.db") = False Then
Database.Initialize(File.DirInternal,"MyDatabase.db",True)
CreateAppDatabase ' this will create tables etc. in the database from another sub in the code module
Return
End If
End If
End Sub