RowSet.BeforeFirstRow
From Xojo Documentation
Read-Only Property (As Boolean )
Returns True when the RowSet is before the first row or the RowSet is empty.
Notes
A new RowSet is always at the first row (if any rows were returned). The only way to set the RowSet to be before the first row is to use RowSet.MoveToPreviousRow, which is not supported by all data sources.
Example
This moves the RowSet pointer so that BeforeFirstRow is True:
Var rs As RowSet
rs = db.SelectSQL("SELECT * FROM data")
If rs <> Nil Then
rs.MoveToPreviousRow
If rs.BeforeFirstRow Then MsgBox("You are before the first row!")
End If
rs = db.SelectSQL("SELECT * FROM data")
If rs <> Nil Then
rs.MoveToPreviousRow
If rs.BeforeFirstRow Then MsgBox("You are before the first row!")
End If