Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to determin the record number in a dBASE/Paradox table Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Determining the record number in a dBASE/Paradox table 25-Aug-02
Category
BDE
Language
Delphi 2.x
Views
147
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas 

Determining the record number in a dBASE/Paradox table

Answer:

The following procedure determines the physical number of the current record
in a dBase or Paradox table:

1   function FindRecordNumber(aDataSet: TDataSet): longint;
2   var
3     cP: CurProps;
4     rP: RECProps;
5     DBRes: DBiResult;
6   begin
7     {Return 0 if dataset is not Paradox or dBase}
8     Result := 0;
9   
10    with aDataset do
11    begin
12      if state = dsInactive then
13        exit;
14  
15      {we need to make this call to grab the cursor's iSeqNums}
16      DBRes := DBiGetCursorProps(Handle, cP);
17      if DBRes <> DBIERR_NONE then
18        exit;
19  
20      {synchronize the BDE cursor with the dataset's cursor}
21      UpdateCursorPos;
22  
23      {fill rP with the current record's properties}
24      DBRes := DBiGetRecord(Handle, DBiNOLOCK, nil, @rP);
25      if DBRes <> DBIERR_NONE then
26        exit;
27  
28      {what kind of dataset are we looking at?}
29      case cP.iSeqNums of
30        0: result := rP.iPhyRecNum; {dBase}
31        1: result := rP.iSeqNum; {Paradox}
32      end;
33    end;
34  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC