I'm relatively new to object-oriented programming and I am having a very nice experience so far. However, I'm having a bit of trouble with RowSets.
I'm trying to achieve the following:
- display a RowSet in a Listbox
- display the same RowSet in a Messagebox
What is currently happening:
- When I run my program, the Listbox is populated as expected, but the messagebox displays an empty string.
- When I put the MessageBox-code before the Listbox-code, the MessageBox displays the expected string, but the Listbox stays empty
//rs is a RowSet resulting from a SQL query Var Message As String ListBox.RemoveAllRows For Each row As DataBaseRow In rs Listbox.AddRow(Row.ColumnAt(0).StringValue) //Display RowSet in Listbox Next For Each row As DataBaseRow In rs Message = Message + (Row.ColumnAt(0).StringValue) //Display RowSet in Messagebox Next MessageBox(Message)
I would expect both to display the RowSet and I have absolutely no idea why this is not the case. I would be very grateful if you could point me in the right direction.
Have a very nice day and stay safe!