Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot delete stand alone idx
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Cannot delete stand alone idx
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00964099
Message ID:
00964099
Views:
48
Hi All,

In my app, I open a table with a structural .cdx file as part of the startup sequence as:
USE (mxfile4) in 4 ORDER TAG numbers.
However, if I add a temporary index for a specific reason
cFile = MXTEMPFILES + "temp.idx"
INDEX ON recno + event + seqno + type + notation TO (cFile)
then try to delete the temporary index later,
cFile = MXTEMPFILES + "temp.idx"
IF FILE(cFile)
   ERASE (cFile)
ENDIF
I get the 'File is in use' error.

According to VFP help (Deleting an Index):
"To delete a stand-alone .idx file, use the DELETE FILE Command. "

The really strange thing is that VFP has added my temp idx index as a TAG to the table and even using
DELETE TAG temp in (cFile)
won't delete the tag.

It appears that I have to physically close the table to remove this temporary index.

Any thoughts would be appreciated.

Regards...Rex Toomey
Port Macquarie Australia
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Next
Reply
Map
View

Click here to load this message in the networking platform