NOT A TABLE/DBF Fox 2.6 for Windows 
Author Message
 NOT A TABLE/DBF Fox 2.6 for Windows

Quote:

> Network crashed. File Header is OK. Has Memo and .CDX. Don't know record
> count or original file size. Any ideas?
> HELP!!!!

Cool down, this is not a serious problem.

I have experienced the "Not a Database File" error many times.  This problem
is really not that serious if you know how to handle it.  It is seldom seen
in a single user environment and is much more common in a peer-to-peer
non-dedicated server situation than on a Novell network with a dedicated
server.

On a Novell network with a dedicated server this problem will *frequently*
occur if the server goes down, in power outage, for example. For this reason
an uninterruptable power supply (UPS) is recommended for the server if power
interruptions are a problem in your area.

Usually, though not always:

 1) The DBF file actual, physical record count does not match the record
    count in the DBF file header.
 2) The DBF header record count contains one more record than is actually
    (physically) present.
 3) If you decrement the record count in the DBF header by one the DBF
    file pops right back.

 WARNING: ALWAYS MAKE A BACKUP!
          THE FOLLOWING PROCEDURE CAN DESTROY YOUR .DBF FILE.

Bring up the DBF file in your favorite hex editor (Norton, PCTools, etc.).
Bytes 4-7 contain the record count.  Since the hex editor starts counting at
byte 0, it will be the 5th byte in from the left.  Decrement it by one, e.g.
if its 05 change it to 04, 0B change it to 0A, etc.  Write it out to disk. Go
into FoxPro.  Try to USE it.  If you still get "Not a Database File," repeat
the procedure, decrementing byte 4 by one again.

The count is stored in the header backwards, or reverse order bytewise, so if
you have to decrement byte 4 past 00, then byte 5 must be changed also. For
example:

  Bytes 4-7     # records in DBF
 -----------    ----------------
 FF 00 00 00         255
 00 01 00 00         256
 FF FF 00 00       65535
 00 00 01 00       65536

So in row two of the above table (00 01 00 00 = 256 records) if you wanted to
decrement the record count in the DBF by one (to 255 records) you would have
to change both byte number 4 (to FF) and byte number 5 (to 00). (FF 00 00 00
= 255).  This same principle pertains across all four bytes. This procedure
looks hard, but its really simple.  It doesn't work all the time, but a lot
of the time it does.

Also, there is an article in the November 1993 FoxPro Advisor magazine
entitled "So It's Not A Database File," on page 20 that will tell you
everything you need to know about how to handle this situation, and then
some.  It was written by Fox gurus Jim Booth and Paul Heiser.

Paul Heiser is the developer of dSALVAGE, a FoxPro file repair utility highly
recommended by many Fox gurus.

His web page can be accessed at:

  http://www.*-*-*.com/

This web page contains product information as well as discussions about some
of the more common file damage problems.

Hope this helps...

--
Bob Ruple
http://www.*-*-*.com/ ~bruple



Fri, 16 Jul 1999 03:00:00 GMT  
 NOT A TABLE/DBF Fox 2.6 for Windows

Network crashed. File Header is OK. Has Memo and .CDX. Don't know record
count or original file size. Any ideas?  
HELP!!!!

Aaron Masters



Fri, 16 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Not a Table/DBF - FPD 2.6

2. Not a Fox table/DBF

3. fonction STR() not found in Fox pro Windows 2.6

4. filefix (fox 2.6 corrupted dbf)

5. Not a table/DBF file

6. Error message - Not a table/DBF file

7. Need help w/ Not a Table/DBF errors

8. Not a table/DBF message

9. Not a table/dbf

10. error 15 not a table/dbf

11. Not a table/DBF error over NT network

12. Error: Not a table/DBF

 

 
Powered by phpBB® Forum Software