Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: John Weller
  Where is John Weller?
 United Kingdom
 John Weller
 To: Nilson Rishi
  Where is Nilson Rishi?
 Nilson Rishi
Subject: RE: how to get table HEADER info
Thread ID: 78700 Message ID: 78859 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Sunday, October 09, 2005 10:48:15 PM         

> Expert,
> I want to have a look at info included in table header,maybe some binary? How could I find them and have a look?
> I used to see a post by Mr.Eric (or someone else?) in which he said that he used a routine to check whether there was any corrupted tables at the startup of a program by checking the table header for every table. And if a certain value in the table header in a certain location (indicates whether a table is corrupted?) is a certain number (2?), it indicated a corrupted table. Then the repair routine follows.
> I need to use that same routine in my exe. But I could not find that post. Therefore, comes this question.
> Please help.


If no one else can give you an easy answer I will point you towards writing your own routine. Look at Table File Structure in Help. That will give you what the table header should look like. Use a hex editor to look at a table and see how it fits together. In your program open the table with FOPEN() and read the various bytes then check that they are correct - if they are not tehn the table may be corrupted.

John Weller


how to get table HEADER info Posted by Nilson Rishi @ 10/7/2005 5:13:58 AM
RE: how to get table HEADER info Posted by John Weller @ 10/9/2005 10:48:15 PM
RE: how to get table HEADER info Posted by Mike Gagnon @ 10/10/2005 1:30:47 PM
RE: how to get table HEADER info Posted by Nilson Rishi @ 10/10/2005 5:53:14 PM