need help
my program has a table and when progrm run , if for any reasen the power went off i missed last records that i post to table
any body can tell me what can i do? :!:

Write the table to disk after every significant update. When you start the program, read the table in from disk. Then, you will lose at most the one last update.

Or, if that is impractical for some reason, then write the records out to disk when you update the table in memory. When you start, re-write those same records to the table so that the table is back in the shape you want.

thank you
could you please , explain more. the Post function in VCL (BCB 5) send records to disk
and i use Post after each change in records.
Behzad

I'm not familiar with that system. One issue could be that the operating system or your compiler's runtime routines are not FLUSHING the writes out to disk. There may be some option when you open the file, and there certainly is is you use the native OS calls. Closing the file will flush the data to disk, but that may be TOO time instensive for you. Still, if you have no control over flushing writes to disk through something like fflush() or the like, you could close the file periodically to flush the records to disk.

I'm not familiar with that system. One issue could be that the operating system or your compiler's runtime routines are not FLUSHING the writes out to disk. There may be some option when you open the file, and there certainly is is you use the native OS calls. Closing the file will flush the data to disk, but that may be TOO time instensive for you. Still, if you have no control over flushing writes to disk through something like fflush() or the like, you could close the file periodically to flush the records to disk.

thank you Chainsaw
I don't think this problam relate to OS because i exam the program over 10 PC's and all of them have the same problem.
i foucus over C++ Builder paradox tables, i quess my problem
relate to paradox tables.
do you know what problem may happen? :!:
Behzad

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.