Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP60- Index for a field
Message
From
23/06/1999 09:48:44
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00232706
Message ID:
00232955
Views:
18
Any suggestions about the index expression NOT matching the field situation?


>>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.
>>
>
>The easiest way would be to spin through the atgs and examine the index expression using SYS(14):
>
>
USE <i>JRandomTable</i>
>LOCAL nCtr, nTagCount
>nTagCount = TAGCOUNT()
>FOR nCtr = 1 TO nTagCount
>   IF UPPER(SYS(14,nCtr)) == 'REPNUM'
>      EXIT
>   ENDIF
>ENDFOR
>*  If nCtr <= nTagCount, there's a tag, and it's number is nCtr
>*  You can now get the name of the Tag with TAG(nCtr)
>*  This won't work unless the index expression matches the field with
>*  no functions or extended expressions;  if this were a character
>*  field and a tag with that field was used as a part of a concatenated
>*  key, or you used the UPPER() function, it won't match
>
>>Thank you in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform