I have a Xojo application using an SQLite Database; currently, when the app opens, the db must be selected from the file/open window. Surely ther must be a way of having the database file connect automatically when the app opens. I have looked at the Eddies Electronics example, but can’t see how the db connects.
Any hints, clues and explanations very welcome.
modified from the language reference here : https://documentation.xojo.com/api/deprecated/deprecated_class_members/database.connect.html
Dim dbFile As New FolderItem(“MyDB.sqlite”)
If dbFile <> Nil Then
Dim db As New SQLiteDatabase
db.DatabaseFile = dbFile
If db.Connect Then
MsgBox("Connected to " + dbFile.Name)
MsgBox("Error: " + db.ErrorMessage)