Link to home
Start Free TrialLog in
Avatar of ginsonic
ginsonicFlag for Romania

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;
........
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello

   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
opps, late again :-(
Avatar of ginsonic

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

the test app work on Win98
Try to set Local Share to true from the BDE Admin
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just for clarify
DbiSaveChanges is called by the flushbuffers-method
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial