Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting field presence in dbf
Message
From
29/07/2007 13:01:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
28/07/2007 11:54:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244177
Message ID:
01244436
Views:
23
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform