Saving goes like this:
"sql = “DELETE FROM ImpUrg” // Comando Sql per eliminare tutte le righe salvate nel database Sql
Try
DB.ExecuteSQL(sql) //Esegue il comando DELETE
Catch err As DatabaseException
MessageDialog.Show("Error deleting the file from the database: " + err.Message)
Return
End Try
try
for i=0 to ToDoWin.ImpUrg.LastAddedRowIndex
'check=ToDoWin.ImpUrg.CellCheckBoxValueAt(i, 0)
DB.ExecuteSQL( bql, ToDoWin.ImpUrg.CellCheckBoxValueAt(i, 0), ToDoWin.ImpUrg.CellTextAt(i, 1), ToDoWin.ImpUrg.CellTextAt(i, 2))
next
Catch error As DatabaseException
ok=False
MessageBox("Error: " + error.Message)
end try
if ok then
DB.commit //solo ora salvi tutto
else
DB.rollback // non
end if"
Column 0 is a Boolena in the SQLite DB
It retrieves the data using the following code:
"ToDoWin.ImpUrg.RemoveAllRows //Vengono eliminate tutte le righe eventualmente presenti nella ListBox
bql = “SELECT * FROM ImpUrg ORDER BY Scad”
eisen = DB.sqlSelect(bql)
If DBError Then Return
// Fetch each visite from the RecordSet and add it
// to the ListBox.
If eisen <> Nil Then
While Not eisen.EOF
ToDoWin.ImpUrg.AddRow(eisen.Field("ch").StringValue, _
eisen.Field("Comp").StringValue, _
eisen.Field("Scad").StringValue)
eisen.MoveNext
Wend
eisen.Close
End If"
If I state ToDoWin.ImpUrg.AddRow(eisen.Field(“ch”).StringValue as Boolean instead of StringValue I get an error.
I’m posting a screenshot of what comes out when you retrieve data: basically, I do not know how to set the chekbox instead of having “false” written besides it