Data.Win.ADODB.TCustomADODataSet.GetRecNo
Delphi
function GetRecNo: Integer; override;
C++
virtual int __fastcall GetRecNo(void);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TCustomADODataSet |
Description
Returns the position of the active record in the dataset. GetRecNo is a getter method for the RecNo property.
Data.Win.ADODB.TCustomADODataSet.GetRecNo inherits from Data.DB.TDataSet.GetRecNo. All content below this line refers to Data.DB.TDataSet.GetRecNo.
Returns the position of the active record in the dataset. GetRecNo is a getter method for the RecNo property.
Use GetRecNo to get the ordinal position of an active record in the dataset. Datasets like TADOTable,TADODataSet, and TADOQuery inherit GetRecNo and override it according to their needs.
Important: When you implement GetRecNo in the derived classes, ensure that it returns the following values:
- -1 (if dataset is in dsInsert state)
- 0 (if dataset is empty)
- current record number (in other cases)