Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Field Data....
Message
 
To
31/07/2000 17:54:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00399035
Message ID:
00399119
Views:
14
>CLOSE DATABASES
>OPEN DATABASE (HOME( ) + 'samples\data\testdata')
>USE customer && Opens Customer table
>
>CLEAR
>FOR gnCount = 1 TO FCOUNT( ) && Loop for number of fields
> ? FIELD(gnCount) && Display each field
>NEXT
>?
>? 'Number of fields: ' + ALLTRIM(STR(gnCount -1))

John,

Field(Exp) returns the name of the field. If you want the data in the feild you need to Evaluate the name as in;
CLEAR
FOR lnCount = 1 TO FCOUNT( )  && Loop for number of fields
	? EVAKUATE(FIELD(gnCount))  && Display each field
ENDFOR
?
? 'Number of fields: ' + ALLTRIM(STR(gnCount -1))
Hope this gets you in the right direction.
Previous
Reply
Map
View

Click here to load this message in the networking platform