Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find out Fieldnames in code?
Message
From
29/06/1999 16:59:34
 
 
To
29/06/1999 16:22:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00235485
Message ID:
00235525
Views:
21
>Hello,
>I am writing a code in FP 2.6, which has to get the values from the fields of a table, while I want to make it as generic as possible.
>I can find out the number of fields with FCOUNT, but can I call the first field, then the second... and so on? I hope there is a function for this, which works in FP 2.6.
>Can anybody help me?

FIELD(number between 1 and FCOUNT()) will return the name of the field in that position, and EVAL(FIELD(number between 1 and FCOUNT())) will return the content of that field.

>Thanks for your time in advance!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform