Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic SQL Insert
Message
From
22/01/1997 17:50:31
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Dynamic SQL Insert
Miscellaneous
Thread ID:
00018130
Message ID:
00018130
Views:
89
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
Next
Reply
Map
View

Click here to load this message in the networking platform