Solved

BDE DATA LOSS?

Posted on 2000-02-18
4
226 Views
Last Modified: 2010-04-04
DEAR SIRS/LADIES,

MY PROBLEM IS WITH THE BDE.

BDE CACHES ALMOST ALL DATA UPDATES
UNTIL THE TABLE IS CLOSED. THIS CAUSE
DATA LOSS WHEN THERE IS A SYSTEM CRASH
OR A POWER FAILURE.

LOCAL SHARE DONT WORK WELL. IT ONLY APPENDS BLANK RECORDS. BUT THE CONTENTS ARE LOST. SOMETIMES CONTENTS ARE FILLED WITH GARBAGE WHICH CAUSE "VALUE TRANSLATE ERRORS". IN ADDITION INDEXES ARE DAMAGED.

ARE THERE A WAY TO REALLY FORCE BDE TO SAVE ALL CHANGES IMMEDIATELY AFTER AN UPDATE OPERATION.

I HAVE CLOSED ALL WRITE BACK BUFFERS OF THE OPERATING SYSTEM (WINDOWS).

MY SOLUTION TO THIS PROBLEM IS TOO SLOW.
WHENEVER I DO AN APPEND OR UPDATE OPERATION I OPEN THE TABLE MAKE CHANGES AND CLOSE IMMEDIATELY.

SHOULD I USE A BDE ALTERNATIVE SUCH AS APOLLO?
ARE THERE A BDE ALTERNATIVE WHICH DO NOT HAVE THE PROBLEMS I MENTIONED ABOVE.
CAN YOU SUGGEST ONE.

TANKS FOR YOUR SUPPORT
0
Comment
Question by:huseyin
  • 2
4 Comments
 
LVL 6

Expert Comment

by:edey
ID: 2536443
how about:

FlushBuffers posts all changes that have been written to the record buffer.

procedure FlushBuffers;

Description

Call FlushBuffers to cause the dataset to post all pending changes to the database, including any cached updates. Use FlushBuffers instead of CheckBrowseMode if it is important that cached record buffers are posted.



GL
Mike
0
 

Author Comment

by:huseyin
ID: 2536506
FLUSH BUFFER DOES NOT MAKE THE JOB.

I HAVE CREATED A CUSTOM TTABLE COMPONENT WHICH FUSHES ITS BUFFER AFTER ALL POST OPERATIONS.

BUT IT DOES NOT HAVE ANY EFFECT.

0
 
LVL 1

Accepted Solution

by:
fulvio_brasil earned 200 total points
ID: 2537289
Hi huseyin,

I had this problem too and solved this using BDE API function DBISaveChanges, on evente OnAfterPost of tables, like this:

procedure TdmdCad.tblAfterPost(DataSet: TDataSet);
begin
  DBISaveChanges((DataSet as TBDEDataSet).Handle);
end;

and direct all my table's AfterPost to this.

-------------

About BDE alternative, I used DBISAM (but, my problem was the size of BDE installation). You can find a try in www.elevate.com - it's very good. It have a FlushBuffer to prevent data loss and a good Repair to re-arrange table index.
0
 
LVL 1

Expert Comment

by:fulvio_brasil
ID: 2537293
PS: You need to put 'BDE' in uses clause

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending Gmail through Delphi 3 91
Internet Explorer View Settings Question 15 106
Base1 Encode/Decode 3 68
DBGrid or StringGrid ? 6 71
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now