Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get index field name
Message
De
15/10/1999 04:23:19
 
 
À
15/10/1999 03:47:32
Ru-Chuan Lu
Retail Workshop
Shanghai, Chine
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00276725
Message ID:
00276728
Vues:
25
>> Is there any way to get index field of table, and know its type, primany or regular? <<

Check out KEY(), CANDIDATE(), PRIMARY() in the on-line help.

Since you need the number of the index tag in the KEY() function, you will need to write a little UDF to get it if you know the name of the tag. This should get you started. It is not guaranteed to work as is since it is off the top of my head and not tested < s >.
LOCAL lcTagName, lnCnt
lcTagName = ORDER()
IF ! EMPTY( lcTagName )
   FOR lnCnt = 1 TO TAGCOUNT()
      IF UPPER( TAG ( lnCnt ) ) = lcTagName
         EXIT
      ENDIF
   ENDFOR
   ? KEY ( lnCnt )
ENDIF
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform