Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Fields by number?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00350251
Message ID:
00350409
Views:
25
Paul,

Why not just use COPY TO ... TYPE ? It'll be much faster.

You can use TRANSFORM(eval(...)) to convert Mike's code into a string suitable for fputs.

>I am wanting to write a routine that takes a table name as a parameter and then will export all of the data. Something like this:
>
>
>
>lparameters cTable
>
>if used(cTable) = .f.
>     x3winmsg("The Table "+alltrim(cTable)+" is not Opened")
>     return .f.
>else
>     nFile = fcreate(cTable+".exp")
>     for nCntr = 1 to fcount(cTable)
>  	fputs(nFile,?)
>     endfor
>endif
>
>
>
>I don't know the syntax in VFP for referencing a field when I don't know the name of the field. In other words to replace the question mark in the preceeding code.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform