Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Let's Play Tag()
Message
 
À
20/07/2000 23:10:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00394742
Message ID:
00396004
Vues:
9
>I bagged the select into cursor route I was taking and tried the use again with a different alias. Then I created some index tags to a temporary file. Like you said, the index file didn't automatically delete when I closed the new alias. I tried to use a delete tag all command to try and get rid of it, but since my original table isn't opened exclusive, it won't let me get rid of the tags. Is there a better way to clean up these extra index files, and if not, how can I check to see if the indexes exist before I add them. In other words, once I run my new routine and create the tags, it does great. If I do it again, it tells me the tags already exist and do I want to replace them. I'm trying to get rid of this prompt and clean up the mess.
>
>Let me know if you have any ideas.
>
>Thanks for you help,
>Russ

PMFJI, but this should work for you:

SELECT (myDBF)
lcIDX = SUBSTR(SYS(2015, 3, 10)
INDEX ON anyfield TO (lcIDX)
* do whatever processing you want to here

*- clean up
SET ORDER TO 0 IN (myDBF)
ERASE (lcIDX + ".idx")

BTW, while not documented to work this way, you can use the SEEK() function with IDX indexes *without* a SET ORDER TO:

SET ORDER TO (lcIDX) IN (myDBF)
? SEEK("goodval") && returns .T.
SET ORDER TO 0 in (myDBF)
? SEEK("goodval", myDBF , lcIDX) && also returns .T.
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein

Bruce Allen
NTX Data
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform