BOF
property BOF: Boolean read;
Example
procedure MoveBeforeCurrent(const Data: TvxClientDataSet);
begin
if not Data.BOF then
Data.Prior;
end;
Usage
BOF indicates that backward navigation is at the beginning boundary of the current dataset view.
- Use Active plus
IsEmpty, not BOF alone, to test for rows. - Check it in reverse loops and ensure
Prioris called on every iteration path. - Cursor-changing callbacks can invalidate a previously read value.
Additional Technical Info
BOF is declared by hidden ancestor TDataSet and is normally used through a visible descendant such as TvxClientDataSet. It is a cursor flag, not a record-number or empty-dataset property by itself.
Source-backed behaviour
The base maintains FBOF through buffer activation/clear and relative navigation. First explicitly sets BOF true after positioning; a failed backward move also sets it true. Clearing/inactivating buffers sets both BOF and EOF true.
The flag describes the current filtered/indexed view and can change after filters, locate, post/delete or resynchronization. A nonempty dataset can legitimately have BOF true while positioned at its first row.
Related members
EOF is the forward boundary. First, Prior and MoveBy update it.