I am in the process of attaching a sqlite database in which I am getting an error of: Operation cannot be completed because the database is closed. to help isolate it, I created a brand new project.
if I use the following code, it generates the error:
[code] app.pantryOwlDB = new SQLiteDatabase
dim pantryOwlFile as FolderItem = FolderItem(SpecialFolder.Documents.Child(“Xojo”).Child(“pantry owl”).Child(“database”).Child(“pantryowl.sqlite”))
if not app.pantryOwlDB.AttachDatabase(pantryOwlFile, “db1”) then
if I replace the code with this, I am able to connect to the database:
[code] dim dbFile As FolderItem = SpecialFolder.Documents.Child(“Xojo”).Child(“pantry owl”).Child(“database”).Child(“pantryowl.sqlite”)
app.pantryOwlDB = new SQLiteDatabase
If dbFile <> Nil And dbFile.Exists Then
app.pantryOwlDB.DatabaseFile = dbFile
msgbox “unable to connect to database file.”
I am interested in attaching the database to perform comparisons with another sqlite database. Anyone come across this issue when attaching a sqlite database?
thank you in advance.