Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining if an index tag already exist in a CDX
Message
 
À
09/10/1998 18:20:27
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00145580
Message ID:
00145588
Vues:
34
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform