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

problem with .CDX

Status
Not open for further replies.

jotita

Programmer
Aug 19, 2002
19
AR
I have 2 programs in VFP6.
I delete all the .CDX before index.
in one all ok, but in the other no.
An error say when open the .DBF that no exist the .CDX
what happend?
THXS!
 
How are you deleting the CDX. If you erase the file (i.e. "ERASE MYFILE.CDX") it will generate the type of error that you described.

The best way to eliminate the index file is:

USE MYFILE EXCLUSIVE
DELETE TAG ALL

Steve
 
yes, I delete it. But in 8 of 10 programs it's ok, no error is displayed.
delete tag all works fine in all case.
 
There must be something different in the way the files are opened in the 2 programs that cause an error. Are you opening the file with an index tag name like "USE MYFIILE IN 0 ORDER TAG1" ?

Be that as it may... it's not good programming practice to erase index files. Why do you need to erase index files? The only time they should be erased is when you have a reason to suspect that they have become corrupted or damaged, and then they should be removed by the "DELETE TAG ALL" method above, followed immediately by a series of commands to rebuild them (i.e. INDEX ON TRANDATE TAG TRANDATE, etc.)

Steve
 
yes, but in 8 of 10 programs with safe off it's ok, in 2 no.
thxs!@
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top