Solved

BDE DATA LOSS?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

13 Experts available now in Live!

Get 1:1 Help Now