Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create table dynamically using strings within a class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01075057
Message ID:
01075058
Vues:
23
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>I managed to create a table dynamically using strings within a class function by the follwing code:
>
>FUNCTION test()
>cTableName = "gbm6165"
>cFieldStructure = [Age I, Lx N(10,4),Qx N(10,8),Dx N(10,4),Nx N(10,4),Sx N(10,4), Cx N(10,4),Mxstreep N(10,4),] + ;
>				  [Rxstreep N(10,4)]
>CREATE TABLE (cTAbleName)(&cFieldStructure)
>ENDFUNC
>
>
>In reality cFieldStructure is a property, but somehow I have to call it locally within the function to let the above code work. Now what I really want is something like this:
>
>CREATE TABLE (cTAbleName)(&this.cFieldStructure)
, but that fails
>
>Do you know what to correct?
>
>Thanks beforehand
TEXT TO lcCreate TEXTMERGE NOSHOW
     CREATE TABLE <<cTAbleName>> <<this.cFieldStructure>>
ENDTEXT
&lcCreate
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform