Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP60- Index for a field
Message
De
23/06/1999 11:28:00
 
 
À
23/06/1999 09:49:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00232706
Message ID:
00233014
Vues:
33
No. But this will work. (untested code, but the logic is good)
repnum_keyno = 0
for x = 1 to tagcount()
    if "REPNUM" $ upper(key(x)) then
        * there is an index containing REPNUM
        repnum_keyno = x
        exit
    endif
next
if repnum_keyno > 0 then
     set order to (tag(repnum_keyno))
else
     index on repnum tag repnum
endif
>I already tried something like that. Any other thoughts? Thank you again.
>
>
>>There doesn't seem to be an easy answer. You have to use something like the tag() function to step thru all your indexes and check to see if the field is part of the key() of the index.
>>
>>
>>>How do I check if a field has an index?
>>>
>>>I would like to know if my REPNUM field has an index but I can't find a way of doing this.
>>>
>>>I have been trying TAG(), TAGNO(), TAGCOUNT(), CDX() and other functions but no answer yet.
>>>
>>>Thank you in advance.
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform