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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using Code References

Status
Not open for further replies.

mbh27

Programmer
Jun 15, 2004
23
0
0
GB
I'm searching for specific text in several projects. The first few have worked fine - i.e. open the project then use 'Tools | Code References' to search for the text across the entire project. On one of the projects, however, I get the error message 'Table has no index order set' as soon as I select 'Code References' from the menu, and I can't proceed from this point.

Anyone know how I can resolve this?
 
If it happens with one particular project, it could be because the project file is corrupted.

I suggest you create a new project (with a different name). Populate it with all the files from the old project. That's not as difficult as it might sound. Just go to Windows Explorer, highlight all the files that you need, and drag them into the project window. It doesn't matter which tab is selected in the project manager.

Then try to run Code References on the new project.

If that solves the problem, delete the old project and rename the new one.

If it doesn't solve the problem .... Come back.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Though I've not yet set up a 'new' project, I looked at a 2-month-old backup copy on another computer. This showed the same behaviour. The first time I called 'Code References' it gave the error 'Index tag not found' when looking at the single menu file, all five report forms, and a single prg file which is not linked into the application. (All the forms and other prgs were ok.) I clicked 'Ignore' on each error and when it finished searching the files we then moved to the error 'Table has no index order set' (referring to the PJX file I assume). When I tried repeating the process it didn't search the individual files but jumped straight to the 'Table has no index . . .' error.

I'm fairly sure that the project builds successfully - it's just the Code References that fails. If the project file were corrupt though surely I'd have problems building it.
 
Found a solution for this after ferretting around in the project directory. There was a file called <projname>_ref.dbf (and its associated FPT file). This looked to hold details of all previous code reference searches and results. I just renamed these files so they were 'out of play'. (There's also a file called <projname>_ref1_dbf.dbf which just looks to hold the structure of the '_ref' file I renamed. I left this file alone.)

When I opened the project again, the Code Reference search worked fine and in doing so rebuilt the <projname>_ref.dbf (and FPT and CDX files). All I've lost is the previous history of searches.

I think the problem may have occurred because the file <projname>_ref.cdx was not present when the original failure happened (maybe I'd deleted it).

I'm now a little older and wiser (or rather there's a fractionally larger gap in my ignorance than before!).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top