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