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

Corrupt index in EXE...

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
Hi

Is there anyway of rebulding an index of a table that has been included as part of the EXE, without have to recreate the EXE?

Neil

I like work. It fascinates me. I can sit and look at it for hours...
 
Neil,

No, for two reasons.

First, presumably the DBF is also embedded in the EXE. The DBF is therefore read-only. Although VFP will allow you to create an index on a read-only table, the link between the table and the index will not be recorded, so the next time you open the table, the index will appear to have disappeared.

Secondly, the existing index file is also read-only (because it's embedded). If VFP allows you to create a new index, either it will try to update the existing file, which will fail; or, it will write a new file, which will be external to the EXE; the existing file will still be in place, and will take precedence over the new one.

The best you can do is create an external copy of the DBF under a different name, and to create an index on that copy.

Why exactly do you want to do this?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I just noticed that you mentioned that the index was corrupted. That answers my last question.

But if the index is embedded in the EXE, how could it get corrupted? An embedded file is read-only. It must have been corrupted when you built the EXE, in which case the correct course is to re-build the EXE.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks Mike, and yes it must have corrupted just after final testing and before the final build (typically!). This particular table controls the data dictionary and default values for the fields, and after releasing the EXE clients were reporting very strange errors when creating records etc, which we realised was due to the wrong defaults being saved to the wrong fields.

I was just hoping we could issue a small 'fix' to get them going again rather than release a new EXE (for various reasons having a new EXE is a very long and slow process their end to get it installed and has to be planned in).

No worries then, new EXE is ready to go!

I like work. It fascinates me. I can sit and look at it for hours...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top