Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting field presence in dbf
Message
De
29/07/2007 13:01:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
28/07/2007 11:54:43
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01244177
Message ID:
01244436
Vues:
25
Hi Thomas

>a=seconds()
>#define IsThereAFieldCalled !SPace(0)==Field
>*-- Space may be a tad slower than "" or '',
>*-- but removing the string marker makes it less brittle
>*-- in case of string-building for eval-situations
>for x = 1 to m.lnStop
> y=IsThereAFieldCalled("somefield","somealias")
>endfor x
>?seconds()-m.a

Very cool. I've used that before and it is very fast. It's just not as flexible as I'd like. You had to pre-code the formula in such a way as to make the ("somefield","somealias") the last part. My SnippetFactory lets me inject any number of "parameters" anywhere in a forumla or snippet with the result being evaluated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform