Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking index
Message
From
16/04/2003 09:14:18
 
 
To
16/04/2003 07:02:31
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00778188
Message ID:
00778279
Views:
28
>Hi Jimi Lee
>
>You can use the following code the Automatically Re-Index the Table, U could fine tune as per your requirement.
>
> TDBF=ADIR(DATAF,"*.DBF")
> FOR I=1 TO TDBF
> Filereindex=DATAF(I,1)
> Use DATAF(I,1) EXCLUSIVE
> If Used()
> Reindex
> Endif
> ENDFOR

Zaheer. Jimi is asking how to check if an index is corrupted - not how to reindex it. I dont think there is a sure fire way to do this though. VFP8 has an additional level of file header checking but not sure about knowing if the entire index is 100% OK.

There are a couple of utilities here in the UT download section which you might be able to use and possibly incorporate into a maintenance app. See

ATFixDbfFpt 1.5a, all xBases supported. File #9930

and

Crashed tables rebuilder File #9264
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform