Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

corrupt memo/blob

Status
Not open for further replies.

tpov

Programmer
Aug 1, 2003
1
AT
Hi,
My program in Delphi5 uses DBase IV files and sometimes (on power breaks, for example) the .DBT grows a lot or the connection to the memo fields is corrupted.
1. How can I protect the files /without UPS/?
2. If I want to repair how can I get information about the corrupted memo?
Thanks ahead
TPOV
 
Having the same problem - - I hope someone responds!!!
 
See faq102-3033. This is about Paradox, but the same techniques are valid for xBase tables. You have to make sure that you flush the data buffers every time that you save.

Another technique that I use:

- Explicitly open and close your tables in your code - don't depend on the IDE to do it for you and don't leave them open in the ID. Open the tables in a form's OnCreate event handler and close them in the form's OnCloseQuery handler (OnCloseQuery gets called even when Windows is shutting down - OnClose doesn't).

As for repair utilities, do a Google search on the words dBase repair. There are a number of utilities available. In my Clipper programming days, there was a utility from Norton that would diagnose and repair corrupted files.

-Dell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top