ginsonic
asked on
My Table don't real Post
I use in my appa dbf file with BDE. All work perfect untill...
Couple days ago, after what I save some records in dbf file, the power go down for couple seconds and this action restart my system.
When I restart my app too, I found that allrecent inputed records , on the last sesion was lost.
Whay ?I saved these (was posted).
I repeated for couple times ( post a record and power off my system).Same results. If I close normally myappand then power off all is OK.
What to do that when I post a record in my table to b sure that is really stored on file and not to memory ( I belive that when I post the record is stored in memory and when close my app just then is saved inside thedbf file).
Best regards,
Nick
P.S.I tested already:
Table1.Post;
Table1.Close;
Table1.Open;
........
Couple days ago, after what I save some records in dbf file, the power go down for couple seconds and this action restart my system.
When I restart my app too, I found that allrecent inputed records , on the last sesion was lost.
Whay ?I saved these (was posted).
I repeated for couple times ( post a record and power off my system).Same results. If I close normally myappand then power off all is OK.
What to do that when I post a record in my table to b sure that is really stored on file and not to memory ( I belive that when I post the record is stored in memory and when close my app just then is saved inside thedbf file).
Best regards,
Nick
P.S.I tested already:
Table1.Post;
Table1.Close;
Table1.Open;
........
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
opps, late again :-(
ASKER
Don't work :( Still lose the records.
>Don't work :( Still lose the records.
-->keep in mind that also the os may cache written data
-->keep in mind that also the os may cache written data
ASKER
the test app work on Win98
Try to set Local Share to true from the BDE Admin
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just for clarify
DbiSaveChanges is called by the flushbuffers-method
DbiSaveChanges is called by the flushbuffers-method
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You need to flush the table for permanently writing the data to the disk, calling post doesn't write the data to disk immediately
Call Table1.FlushBuffers; on the after post event for writing the posted data from buffer to the disk
HTH
Regards,
Mohammed