Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining if an index tag already exist in a CDX
Message
 
To
09/10/1998 18:20:27
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00145580
Message ID:
00145588
Views:
33
try THIS:

* sample Call
IF !istagthere("employee","SSN")
INDEX ON ssn TAG ssn
ENDIF


*------------------------*
FUNCTION istagthere
* am checking for 254 tags, not sure if limit is higher now...
PARAMETERS lcfilename,lctagname
IF PARAMETERS() <> 2
MESSAGEBOX("You must pass both Table and Index Name")
RETURN .F.
ENDIF
lncurrarea = SELECT(1)
lbtagexist = .F.
SELECT &lcfilename
FOR ncount = 1 TO 254
IF EMPTY(TAG(ncount))
EXIT && Exit the loop when no more tags are found
ENDIF
IF TAG(ncount) = UPPER(lctagname) && Checks for tags in the index
lbtagexist = .T.
EXIT
ENDIF
ENDFOR
RETURN lbtagexist
Previous
Reply
Map
View

Click here to load this message in the networking platform