Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Fields by number?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00350251
Message ID:
00350409
Vues:
27
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform