Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Loosing cached DB records

Posted on 2000-07-13
6
Medium Priority
?
136 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

719 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