Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get index field name
Message
From
15/10/1999 04:23:19
 
 
To
15/10/1999 03:47:32
Ru-Chuan Lu
Retail Workshop
Shanghai, China
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00276725
Message ID:
00276728
Views:
24
>> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform