Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic SQL Insert
Message
De
22/01/1997 17:50:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Dynamic SQL Insert
Divers
Thread ID:
00018130
Message ID:
00018130
Vues:
93
Is it possible to create dynamic SQL on the fly and then execute. I suppose it wouldn't need to be SQL but could be any fox code. The true requirement here is that the statement(s) are created and executed dynamically.

What i have is a 2D array which contains some or all field names of a particular table in the first column and the value of that field i want to insert.

laMyArray[1,1] = 'fieldA'
laMyArray[1,2] = 'apples'
laMyArray[1,1] = 'fieldB'
laMyArray[1,1] = 'bananas'

some code ...
would dynamically
INSERT INTO MyTable (fieldA, fieldB) VALUES ('apples', 'bananas')

tia, kim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform