Frogger
asked on
Loosing cached DB records
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([Ta ble1]);
Your help would be greatly apprectiated!
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').
Table1.FieldByName('Bld').
Table1.Post;
Database1.Commit;
Database1.ApplyUpdates([Ta
Your help would be greatly apprectiated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Table1.FlushBuffers;
ASKER
Comment accepted as answer
ASKER
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 :)
Frogger :)
But I think this is suitable if you didn't use Database componet, but meilk's method is suitable for your case.
Motaz
Motaz
hi frogger,
thanks for accepting my comment as answer.
glad you get it work.
good luck again
stork :-))
thanks for accepting my comment as answer.
glad you get it work.
good luck again
stork :-))