I’m migrating my existing project in Xojo (2019 3.2) and my existing SQLite database (1 table, and 1 virtual table created with FTS5 to use full search) and some triggers to make stay in sync the 2 tables, in Valentina SQLiteServer.
I’m now on my MBP (develop and debug purpose) where i’ve not installed server (and i’m not connected to my network).
So i’ve now on my MPB my SQLite database in my special folder Application Data.
In open app event i have modify the existing code with this code (do you think is ok) ?
DB = new VSQLiteDatabase
#If DebugBuild then
Var dbFile As FolderItem = SpecialFolder.ApplicationData.Child("NiP/NiP.db"
DB.DatabaseFile = dbFile
Try
DB.Connect()
Catch err As DatabaseException
MessageBox ("Errore: " + err.Message)
Return
End Try
#ElseIf TargetMacOS then
if ArchivioInRete = "SI" then
DB.Host = "localhost"
DB.UserName = "sa"
DB.Password = "sa"
DB.Port = 15532
DB.databaseName = "NiP.db"
Try
DB.Connect()
Catch err As DatabaseException
MessageBox ("Errore: " + err.Message)
Return
End Try
End If
If ArchivioInRete = "NO" Then
rbArchivioInReteNO.Value = True
Var dbFile As FolderItem = SpecialFolder.ApplicationData.Child("NiP/NiP.db"
DB.DatabaseFile = dbFile
Try
DB.Connect()
Catch err As DatabaseException
MessageBox ("Errore: " + err.Message)
Return
End Try
end if
#EndIf
I've added to my Xojo (i'm running on Mac OS X 10.15.6) Valentina plugin and declare DB as VSQLiteDatabase.
Now in Debug Build on MBP when execute this query:
DB.AddRow(“Notifiche”, row)
I receive this error: ERROR DB UNKNOWN and in the debugger:
Database exception ErrorNumber 427264
Why ? How to solve that ?
Thanks