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 prevent the BDE from loosing information 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
Prevent the BDE from loosing information 06-Jul-03
Category
BDE
Language
Delphi 2.x
Views
168
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Kevin Howell

How do I prevent the BDE from loosing information in an application when the PC 
locks up. 

Answer:

Solve 1:

Use the BDE API call DBISavechanges(handle). This will save all data in buffers 
directly to the database thus preventing a loss of data should anything go wrong in 
the current database session. 

Example 

Add BDE to the forms uses clause 

1   procedure TDataform.qryEmployeeAfterPost(DataSet: TDataSet);
2   begin
3     DBISavechanges(qryEmployee.handle);
4   end;



Solve 2:

5   unit bdeCommands;
6   {..
7   ...
8   ..
9   ...}
10  uses BDE;
11  {...
12  ... }
13  
14  function SaveBufferToFile(Dataset: TDataset): Boolean;
15  begin
16    Result := BDESaveChanges(Dataset);
17  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