Is there any limitation in the number of rows that can be loaded to a weblistbox from a rowset? The rowset comes from a Postgresql database with 2400 records. If I limit the selection of records to lets say 1000, it works but 2000 or more are never loaded without any error message from the database.
Var sql As String
sql = "SELECT * FROM covid ORDER BY fecha_diagnostico"
Var rs As RowSet
Try
rs = Session.DB.SelectSQL(sql)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
Return
End Try
If rs Is Nil Then Return
MessageBox "tiene " + rs.RowCount.ToString + " filas y " + rs.ColumnCount.ToString + " columnas"
// remover todas las filas
Listbox1.RemoveAllRows
// Añadir las columnas de la base de datos como los headers del listbox
Listbox1.ColumnCount = rs.ColumnCount
For i As Integer = 0 To rs.LastColumnIndex
Listbox1.HeaderAt(i) = rs.ColumnAt(i).Name
Next
//Añadir la data desde la tabla
While Not rs.AfterLastRow
Listbox1.AddRow("")
For i As Integer = 0 To rs.LastColumnIndex
Listbox1.CellTextAt(Listbox1.LastAddedRowIndex, i) = rs.ColumnAt(i).StringValue
Next
rs.MoveToNextRow
Wend
Thanks. That worked but is very difficult to use the SelectionChanged event of the Listbox to retrieve specific pieces of information from the selected row