RowSet.BeforeFirstRow

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aRowSet.BeforeFirstRow

New in 2019r2

Supported for all project types and targets.

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

See Also

RowSet.AfterLastRow, RowSet.MoveToPreviousRow