Solved

BDE DATA LOSS?

Posted on 2000-02-18
4
228 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 96
Delphi 2 69
how can i search if string exist in array ? 3 63
How to make Sign in, using Clientdataset? 1 28
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 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