Solved

Loosing cached DB records

Posted on 2000-07-13
6
129 Views
Last Modified: 2010-04-04
I have a DB for Windows Database and I
loose records when I turn the power off to my PC, it is crutial that I loose NO records, how can I tell Delphi/BDE that I want the records written to file immediately and to take all cached files and write them to the database, turning the virtual memory off is not an option.

At the moment my code looks similar to this :

 Database1.StartTransaction;
 Table1.Insert;
 Table1.FieldByName('Age').Value := '9';
 Table1.FieldByName('Bld').Value := 'A';
 Table1.Post;
 Database1.Commit;
 Database1.ApplyUpdates([Table1]);

Your help would be greatly apprectiated!
0
Comment
Question by:Frogger
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 3341170
hi frogger, i'm the stork :-))

try this change

Database1.StartTransaction;
 Table1.Insert;
 Table1.FieldByName('Age').Value := '9';
 Table1.FieldByName('Bld').Value := 'A';
 Table1.Post;
 Database1.ApplyUpdates([Table1]);
 Database1.Commit;

meikl
0
 
LVL 7

Expert Comment

by:Motaz
ID: 3341275
Table1.FlushBuffers;
0
 

Author Comment

by:Frogger
ID: 3341293
Comment accepted as answer
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:Frogger
ID: 3341294
Thanks, I figured out what the best way was to answer my question a short while after posting it, and the answer was an exact replica of your... thanks for the help anyway it's much appreciated...

Frogger :)
0
 
LVL 7

Expert Comment

by:Motaz
ID: 3341296
But I think this is suitable if you didn't use Database componet, but meilk's method is suitable for your case.

Motaz
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 3341357
hi frogger,

thanks for accepting my comment as answer.
glad you get it work.
good luck again

stork :-))
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 69
Delphi and Access based Enumeration 9 64
RESTRequest Parameter 4 31
Firemonkey BASS_Init into a thread 17 9
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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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