Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP60- Index for a field
Message
From
23/06/1999 11:28:00
 
 
To
23/06/1999 09:49:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00232706
Message ID:
00233014
Views:
31
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!
Previous
Reply
Map
View

Click here to load this message in the networking platform