Solved

My Table don't real Post

Posted on 2004-03-29
10
169 Views
Last Modified: 2010-04-05
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;
........
0
Comment
Question by:ginsonic
[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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 150 total points
ID: 10702360
use after each post

Dataset.FlushBuffers;

keep in mind that also the os may cache written data

meikl ;-)
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 10702379
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
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 10702389
opps, late again :-(
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Author Comment

by:ginsonic
ID: 10704123
Don't work :( Still lose the records.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10704167
>Don't work :( Still lose the records.

-->keep in mind that also the os may cache written data

0
 
LVL 9

Author Comment

by:ginsonic
ID: 10704644
the test app work on Win98
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 10704695
Try to set Local Share to true from the BDE Admin
0
 
LVL 22

Assisted Solution

by:Mohammed Nasman
Mohammed Nasman earned 50 total points
ID: 10704835
I found this note on the net, so it may help you, as meikl said before, the problem appear to be from the OS which catch the database files, I think you could disable the diks cache in win98
====
 local database (Paradox, dBASE, FoxPro) are not designed to withstand such behavior. If your requirements are
such that you need to allow for such
behavior, you should use a Client/Server Database which is designed for it.

I suspect what is happening here is the OS, not the BDE, is doing some buffering
here. And, the only way to you can insure
the OS writes the file completely is to close it. Naturally, this isn't
practical.

The one thing you might do to prove the BDE is writing all the information is to
place the data on a shared drive, write
data from one machine, and read it from another. If you can read it, you know the
data has been written.

Finally, you should know that DbiSaveChanges has no effect on remote data, or
when local share is true for local data (local share makes it act like remote data).
====
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10704851
just for clarify
DbiSaveChanges is called by the flushbuffers-method
0
 
LVL 17

Assisted Solution

by:geobul
geobul earned 50 total points
ID: 10704857
Hi,

You don't really have control over the disk cache. Buy yourself an UPS. Using small off-line UPS you can force shutdown on your computer when the power goes down and your records won't be lost.

Regards, Geo
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month5 days, 10 hours left to enroll

626 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