Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP60- Index for a field
Message
De
23/06/1999 09:48:44
 
 
À
22/06/1999 18:58:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00232706
Message ID:
00232955
Vues:
19
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform