Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a Variable as Field Name
Message
 
 
To
26/04/2005 16:26:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01008608
Message ID:
01008646
Views:
16
This message has been marked as the solution to the initial question of the thread.
>I would also suggest:
>
Function getRecords(fieldname)
>   Select &fieldname From myTable...
>EndFunc
>
>
>This allows "fieldname" to contain a list of fields, if desired, separated by commas; e.g., "partno, descr"

It also could be faster because macro substituion is evaluated only once and EVALUATE (fieldname) will be executed for every record.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform