Data.DB.TDataSet.GetRecord
| [–] Properties | |
|---|---|
| Type: function | |
| Visibility: protected | |
| Source: Data.DB.pas Data.DB.hpp
| |
| Unit: Data.DB | |
| Parent: TDataSet | |
Delphi
function GetRecord(Buffer: TRecBuf; GetMode: TGetMode; DoCheck: Boolean): TGetResult; overload; virtual; {$IFDEF NEXTGEN}abstract;{$ENDIF NEXTGEN}
function GetRecord(Buffer: TRecordBuffer; GetMode: TGetMode; DoCheck: Boolean): TGetResult; overload; virtual; abstract;
C++
virtual TGetResult __fastcall GetRecord(TRecBuf Buffer, TGetMode GetMode, bool DoCheck)/* overload */;
virtual TGetResult __fastcall GetRecord(TRecordBuffer Buffer, TGetMode GetMode, bool DoCheck) = 0 /* overload */;
Description
Moves to the specified record.
Use GetRecord to get the record specified by the GetMode parameter.
The Buffer parameter is a pointer to the memory location that represents the record buffer.
The GetMode parameter specifies the record retrieve mode and can take the following values:
| Value | Description |
|---|---|
|
gmCurrent |
The current record will be retrieved. |
|
gmNext |
The record after the current one will be retrieved. |
|
gmPrior |
The record prior to the current one will be retrieved. |
When the DoCheck parameter is True the method signals when an error occurs while attempting to retrieve data from the current record and returns grError.
The method returns a TGetResult value with the following significance:
| Value | Description |
|---|---|
|
grOK |
No errors occurred while attempting to retrieve data from the current record. |
|
grBOF |
Begin of file is returned when the dataset is at the beginning. |
|
grEOF |
End of file is returned when the dataset is at the end. |
|
grError |
An error occurred while attempting to retrieve data from the current record. |
Note: This method is abstract. All datasets must override it according to their need.
See Also