Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Determining the record number in a dBASE / Paradox table
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The following procedure determines the physical number of the current record
in a dBase or Paradox table:
 | |  | |
function FindRecordNumber (aDataSet : TDataSet): longint;
var
cP: CurProps;
rP: RECProps;
DBRes: DBiResult;
begin
Result := 0;
with aDataset do
begin
if state = dsInactive then exit;
DBRes := DBiGetCursorProps(Handle,cP);
if DBRes <> DBIERR_NONE then exit;
UpdateCursorPos;
DBRes := DBiGetRecord(Handle,DBiNOLOCK,nil,@rP);
if DBRes <> DBIERR_NONE then exit;
case cP.iSeqNums of
0: result := rP.iPhyRecNum;
1: result := rP.iSeqNum;
end;
end;
end;
| |  | |  |
Comments:
|