Now read the entries:
var sql as string = “select * FROM table1”
Var rowsFound As RowSet
Try
rowsFound = myDB.SelectSQL(sql)
If rowsFound <> Nil Then
For Each row As DatabaseRow In rowsFound
if DebugBuild then
system.DebugLog “row.Column(”“checked”").BooleanValue=" + row.Column(“checked”).BooleanValue.ToString
end if
Next
rowsFound.Close
Catch error As DatabaseException
MessageBox(CurrentMethodName + ": Error: " + error.Message)
End Try
// db is a valid connection to a SQLite database
Var rowsFound As RowSet
Try
rowsFound = db.SelectSQL("SELECT * FROM Customer WHERE PostalCode=" + PostalCode.Value)
For Each row As DatabaseRow In] rowsFound
ListBox1.AddRow(row.Column("Name").StringValue)
Next
rowsFound.Close
Catch error As DatabaseException
MessageBox("Error: " + error.Message)
End Try
The sample is using row.Column and not rowsFound.Column, so my question, is this a docs bug or bug with row.Column(“xxx”).BooleanValue ?
I was surprised to see that too, but from the docs, starting with 2019r2:
Iterator
You can iterate through a RowSet using For Each and a DatabaseRow. This lets you get at the column values of the row but does not let you make any changes to the row (if you do then a DatabaseException is raised).
Guess my old-fashioned way of moving through the rowset manually prevented me from seeing what I would consider a bug according to the docs.