First DatabaseRow in RowSet gets empty values for strings

I have gotten problems with that first row in RowSet gets empty values for Strings.
I’m running macOS 10.15.7 and have tested with Xojo 2021 Release 1.1 and Xojo 2020 Release 2.1, same problem in both. I’m using the Xojo ODBCDatabase class and Actual ODBC driver (v 5.1.3) to connect to a Azure SQL database.
Running in debugger I see the expected values in the RowSet but once the “For Each cur As DatabaseRow In rows” is executed the value gets Nil in the RowSet and empty string in the DatabaseRow.
I tested with other table with many string columns and there all these columns got empty values for the first record.
Code snippet, RowSet before “For each…” and RowSet in first iteration of “For each…”:

Hi Åke,

there are some known problems with the iterator of RowSet.
I found out that they have one iteration even if the RowSet is empty (<>)

My workaround was to use RowSet.ColumnAt() and RowSet.MoveToNextRow in

Hi Fabian,

And thank you, your workaround works!

Regards // Åke

1 Like