For a RecordCount = 1 i would expect BOF and EOF to be True.
No. BOF and EOF are only set on movement of the cursor.
1. The cursor is on the last record, and the TDataset.Next method is called.
https://www.freepascal.org/docs-html/fcl/db/tdataset.eof.htmlSo, although you are on the last record after Append with one record, Next isn't called, so EOF is false.
Although the documentation page of
BOF isn't that clear, the same as for EOF goes for BOF.
Only exception is when there is an empty dataset. Then both BOF and EOF are true.
Also note:
In all other cases, EOF is False. Note: when the cursor is on the last-but-one record, and Next is called (moving the cursor to the last record), EOF will not yet be True.
So, EOF will only trigger if you are trying
to go past the last record. Not when you reach that last record.
(That's why you do a while EOF loop with Next on the end, otherwise this would go wrong)