Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Internal consistency error
Message
From
06/06/2001 11:31:03
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00514884
Message ID:
00515822
Views:
23
Hirsh --

I assume that you don't have a backup of the data without the problem.

If the file doesn't respond to the solutions that we've proposed, it's likely damaged so that FP can't process it as a table. Part of it may have been overwritten by another file, or who knows.

Here are a couple thoughts:

1. Check out one of the file repair utilities for VFP. Some may be sponsors here, or there's a website that handles a lot of Fox stuff, and you'll find several different ones. I don't have a specific recommendation. IF the file can be repaired -- and there's no guarantee -- this would probably be the easiest solution.

2. Can you open the .DBF with Wordpad? If you can, at least you'll be able to view the non-memo data. If you look at the Fox doc, you'll find a description of the .DBF structure. First, there's a header, which contains information such as the number of fields, each field name along with its data type and size, as well as the number of records, whether it is has a CDX, etc.

After that, you'll find data -- in a strict structure identified in the header. Memo and general fields are the exception -- you'll find they each take 4 bytes -- which is an address into the .FPT file.

If you find data through this method, you could write a program to access the file through FileToStr or the low level file operators. You'd want an empty table with the same structure as the old table. First, find the 1st byte of data after the header. Then, with the total field length, get a line of data representing a record. Then parse each line of data representing a record and stick each field into the new table (omitting the Memo and General field links, as these would be invalid. You could also manually go through the FPT of the damaged table in WordPad and insert the data into the table.

Best wishes!

Jay
Previous
Reply
Map
View

Click here to load this message in the networking platform