Hi Guys,
I am trying to populate a list box from a SQLlite db. I tried the following code but I only get one record on the listbox. Right now I have 8 records in the db. I also tried to use the RowSet.Rowcount so I can see it in a message box and it returns 1. I have the first code I tried rem out.
What am I missing. Can’t get the number of Rows
ProdListbox.RemoveAllRows
rs1.MoveToFirstRow
rs1.MoveToLastRow
vCount = rs1.RowCount
MessageBox vCount.ToString
If rs1 <> Nil Then
// Add the data from the table
//While Not rs1.AfterLastRow
//ProdListbox.AddRow("")
//For i As Integer = 0 To rs1.LastColumnIndex
//ProdListbox.CellValueAt(ProdListbox.LastAddedRowIndex, i) = rs1.ColumnAt(i).StringValue
//ProdListbox.RowTagAt(ProdListbox.LastAddedRowIndex) = rs1.Column(“ProdID”).IntegerValue
//Next
//rs1.MoveToNextRow
//Wend
While Not rs1.AfterLastRow
vProd = rs1.Column(“ProdNombre”).StringValue
vPrecio = rs1.Column(“ProdPrecio”).StringValue
ProdListbox.AddRow(vProd,vPrecio)
ProdListbox.RowTagAt(ProdListbox.LastAddedRowIndex) = rs1.Column(“ProdID”).IntegerValue
rs1.MoveToNextRow
Wend
End If