• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

database

Hi

Some times while i am using database (paradox for example) i save some data to notice later that it's gone or not saved. so my question is how can prevent losing data and how can i secure my database

regards
0
ibrobar
Asked:
ibrobar
1 Solution
 
TheRealLokiSenior DeveloperCommented:
hmmm, i don't have this problem
usually the data is written to the DB when you do the Table1.POST, and it is therefore "saved"
I'm not sure what OS you are using, but if it's win95/98 it might be your smartdrv.exe caching settings

otherwise, you could try
Table1.FlushBuffers; or Table1.ApplyUpdates;
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.

if you are using a TDatabase coponent, i suppose you can have some caching
Make sure you are doing a database.commit;

If you are using interbase/firebird there were a couple of version that had "forced_writes" turned off by default, meaning the data was not guaranteed to be written to disk if you had a power cut, etc.
You can turn this setting back on by using IBConsole/IBOConsole/GFix etc
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now