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 view dBase records which are marked for deletion 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
28-Aug-02
Category
BDE
Language
Delphi All Versions
Views
133
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

How to view dBase records which are marked for deletion

Answer:

Call the following function on the AfterOpen event of the table. You must include 
DBITYPES, DBIERRS, DBIPROCS in the uses clause. To call, send as arguments name of 
TTable and True / False depending to show / not show deleted records. Example:

1   procedure TForm1.Table1AfterOpen(DataSet: TDataset);
2   begin
3     SetDelete(Table1, TRUE);
4   end;
5   
6   procedure SetDelete(oTable: TTable; Value: Boolean);
7   var
8     rslt: DBIResult;
9     szErrMsg: DBIMSG;
10  begin
11    try
12      oTable.DisableControls;
13      try
14        rslt := DbiSetProp(hDBIObj(oTable.Handle), curSOFTDELETEON,
15          LongInt(Value));
16        if rslt <> DBIERR_NONE then
17        begin
18          DbiGetErrorString(rslt, szErrMsg);
19          raise Exception.Create(StrPas(szErrMsg));
20        end;
21      except
22        on E: EDBEngineError do
23          ShowMessage(E.message);
24        on E: Exception do
25          ShowMessage(E.message);
26      end;
27    finally
28      oTable.Refresh;
29      oTable.EnableControls;
30    end;
31  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