Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FoxPro 2.6 application index problem - HELP !

Status
Not open for further replies.

LuckyDog33

Technical User
Oct 20, 2001
1
US
I'm working in an application and when I try to open the database I get the following Program Error message:

" Index does not match table. Recreate index. "

Can anyone please help me solve this?
 
Hello,
You index file is corrupted. You start foxpro and recreate the index for the table in question. If this does not solve the problem, delete the index and recreate it.

This will solve youe problem.
:) ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
LuckyDog33,

If that message appears when you issue "USE mytable", it means your using an estructural index. That means that the existance of the index is embbedded in the table (.dbf) itself; that's why the USE command fails, the table is not opened and your are not able to just launch a "REINDEX".

So, as Ramani says, you will have to erase the index file and issue the INDEX ON ... command again.

Sometimes complex index expressions are used and its a good practice to have them written in some piece of code, considering the error you're getting is not so unusual!

(Let us know if this helped)

David.
 
I like to store all my CDX information in a database memo field. This allows me to reindex the files as required.

This routine will collect any cdx information from dbf/cdx file and store them in a table.

This routine will reindex the files stored in the database when called.

The structure of the dbf the cdx info is stored in is
If you want to try to use these routine you may, They call other programs, look for them in the same location. David W. Grewe
Dave@internationalbid.com
 
Another possibility, FPW and FPD different version compatibity problem(Foxpro's bugs, I had discussed on forum earlier). The DBF and IDX files were created earlier version.
 
How do I start fox and receat index? I am not a programer. I am using a fox2.6a application on window NT 2000 for a clinical microbilogy lab. The messenge "Index does not match table, Recreat Index appear when we start the application. I try to reinex it with Fox2.6 a but I can not do it. Please hel. Thanks.
 
Hi,

I'd suggest, if possible, to contact application programmer to follow his instructions. Maybe in the applications are embbeded index recreation modules (they should)

If not, you should identify the table (.dbf file) that is given the error. This may not be easy, specially if there are plenty of .dbf files. Let's consider the easiest case: you find the table (table.dbf) and it has a structural index (table.cdx); then the only thing you have to do is

USE ?
(find table.dbf)
REINDEX
USE

in the FP command window.

Good luck!

David.
 
Hi
just see my FAQ - if this helps ..

Utility to Reindex Tables with CDX Index
faq182-1388

:) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Many of the above suggestions will work well as long as your index files have not been corrupted.

If the index file has been corrupted, then you will be faced with some more difficult options.

1. To see if you have a backup of the original index file - perhaps from a month ago or so since recent ones might also be corrupted.
If so, then restore the single specific index file (.CDX or .IDX) and then REINDEX.

2. To closely examine the existing tables to see if you might have one which contains the necessary information to re-build the index file.

3. (Absolute Last Resort) To decompile the program with ReFox and examine the code to see how the indicies for that table are used and then to build a new index file.

Good Luck
jrbbldr
jrbbldr@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top