block header error

sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

block header error

Post by sourceuno »

I get the following error when doing a simple select on a particular table:

000 Corrupt block header at 0x00000000000183F3 in KDBF file E:\BoardDB\SYSTABLE.tbl in function read_head

Right after the error, the results from the query appear correctly. How can I get rid of this error?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

block header error

Post by Kai »

Either the table has been corrupted, or you're running a 64-bit Texis on a 32-bit database (ie. you recently upgraded from 32 to 64-bit Texis). You can run texis -version and look for -32 or -64 at the end of the second line to see which version you're currently running. 64 and 32 bit databases are not compatible due to the fundamental type change. If so, you'll need to re-create your database and tables from scratch with the 64-bit version, and re-import your data with timport or the like, from a text dump from the old database (using the 32-bit Texis on the old 32-bit database).

If you have not changed from 32 to 64 bit versions (or vice versa), then SYSTABLES has been corrupted. Stop all database activity, and run kdbfchk -o fix.tbl SYSTABLE.tbl, then copy fix.tbl to SYSTABLE.tbl. kdbfchk will attempt to repair the SYSTABLE.tbl file. You may have to use addtable to add some existing tables back into SYSTABLES, if kdbfchk removes some corrupt rows.