<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Properties > EOFAction |
Declaration
property EOFAction: TEOFAction;
TEOFAction = (eaEOF, eaMoveLast);
Description
Sets the action of EOF following a failed Seek. By default (eaMoveLast), a failed Seek positions the cursor to the last record in the table (or active index order), sets the Found flag to False, but EOF (and ApolloEOF) remain False.
To emulate the behavior more similar to pure xBase, set this property to eaEOF. This will result in a failed Seek being positioned at record number (RecCount + 1), will set both ApolloEOF and EOF to True.
Delphi Example
ApTbl.IndexName := 'NAMES';
ApTbl.EOFAction := eaEOF;
ApTbl.Seek( 'Smith' );
if ApTbl.Eof then
ShowMessage( 'Not Found' )
else
ShowMessage('Found');
C++Builder Example
ApTbl->IndexName = "NAMES";
ApTbl->EOFAction = eaEOF;
ApTbl->Seek( "Smith" );
if (ApTbl->Eof)
ShowMessage( "Not Found" );
else
ShowMessage("Found");
See Also