Test.sqlite file does not have many values to sum from
The ID (Primary) declaration is bad.
Test.sqlite seems to not been created correctly. I found Returns in it (not problematic) and \TAB (?) and allnames (TABLE, COLUMNS) between quotes (?).
The Xojo project does not seems to have created the
Test.sqlite file: I do not found any code to do that.
I suppose the
PushSomma button is meant to make the addition, but the code does not do anything.
Heres a CREATE string that works fine:
CREATE TABLE Ditte(ID INTEGER NOT NULL, Ditta TEXT, Fattura TEXT, Data_Fattura TEXT, Importo TEXT, Data_Pagamento TEXT, Metodo TEXT, Causale TEXT, PRIMARY KEY(ID));
Code to create the file beside the application:
[code]Sub Open() Handles Open
// 1. Create the SQLite db file
Dim f As FolderItem
f = New FolderItem(“Test.sqlite”)
Dim db As New SQLiteDatabase
db.DatabaseFile = f
If db.CreateDatabaseFile Then
// proceed With database operations…
MsgBox("Database not created. Error: " + db.ErrorMessage)
// 2. Add a TABLE
Dim sql_cmd As String
sql_cmd = “CREATE TABLE Ditte(ID INTEGER NOT NULL, Ditta TEXT, Fattura TEXT, Data_Fattura TEXT, Importo TEXT, Data_Pagamento TEXT, Metodo TEXT, Causale TEXT, PRIMARY KEY(ID));”
If db.Connect Then
// Set page_size before any other commands are sent
// db.SQLExecute(“PRAGMA page_size = 8192;”)
// Add the TABLE
Code above taken from the LR and a bit transformed, then added in the App Event.