Solved

BDE DATA LOSS?

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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