// Variables defined here...
Var rsData As RowSet = dbJobLogSp.SelectSQL( "SELECT * FROM tblTankLocations WHERE address=? ORDER BY status ASC, manufacture ASC", "18535 5th Ave" )
Var sStatus As String = rsData.Column( "status" ).StringValue
// Where the magic happens... or breaks...
lstBxTanks.RemoveAllRows
Try
If( rsData <> Nil ) Then // So long as there is a record return it then close the rowset...
For Each row As DatabaseRow In rsData
If( sStatus = "Decommisioned" )Then
// Do not a thing...
Else
lstBxTanks.AddRow( rsData.Column( "rNum" ).StringValue )
lstBxTanks.CellTextAt( lstBxTanks.LastAddedRowIndex, 1 ) = rsData.Column( "serNum" ).StringValue
lstBxTanks.CellTextAt( lstBxTanks.LastAddedRowIndex, 2 ) = rsData.Column( "manufacture" ).StringValue
lstBxTanks.CellTextAt( lstBxTanks.LastAddedRowIndex, 3 ) = rsData.Column( "size" ).StringValue
lstBxTanks.CellTextAt( lstBxTanks.LastAddedRowIndex, 4 ) = rsData.Column( "tankDate" ).StringValue
lstBxTanks.CellTextAt( lstBxTanks.LastAddedRowIndex, 5 ) = rsData.Column( "status" ).StringValue
End If
sStatus = rsData.Column( "status" ).StringValue
Next
Else
MessageBox( "What no records?!" )
End If
rsData.Close
Catch error As DatabaseException
MessageBox( "Error: " + error.Message )
End Try
I don’t know why the record still loads when I explicitly tell it not to. This is driving me bonkers trying to sort this out! Linux Kubuntu 26.04 LTS using Sqlite as the DB.