Hi,
My project (built using xojo version 2019 release 3.1) uses an sqlite database that is created in the SpecialFolder.ApplicationData folder on startup. In the App.Open event handler, first it connects to the sqlite database called MainDatabase, which is encrypted. Then it attaches a second sqlite database, UserData.db, also in the AppData folder, which is not encrypted.
Var myDBFile As FolderItem = SpecialFolder.ApplicationData.Child(ActiveApp.Name).Child("UserData.db")
If myDBFile <> Nil And myDBFile.Exists Then
Var sql As String = "ATTACH DATABASE '"+myDBFile.NativePath+"' AS ud KEY ''"
If Not MainDatabase.SQLExecute(sql) Then
MessageBox("Error. Unable to attach User Data.")
Quit
End If
Else
MessageBox("UserData.db missing from Application Data folder" + EndOfLine + CurrentMethodName)
End If
Out of several hundred users of my app, one person has reported an issue where they are getting the “Error. Unable to attach User Data.” messagebox, on their Windows laptop. I’m not sure what OS they are using. They have experienced the error using both 32 bit and 64 bit versions of my app.
I have verified that the MainDatabase and UserDatabase files have actually been created and exist in the AppData folder. Would anyone have any ideas as to why the attachment might fail, or how to try to troubleshoot this issue?
Thanks for your help,
Frank