DatabaseRow.ColumnCount
From Xojo Documentation
Method
Returns the number of columns in the DatabaseRow.
Sample Code
Sets the number of columns in a listbox (CustomersList) to the number of columns in a database row (row):
CustomersList.ColumnCount = row.ColumnCount