Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple SQL Commands in SPT to Oracle
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00941330
Message ID:
00941334
Views:
11
>Has anyone figured out how to submit more than one SQL - INSERT command in ONE SQLEXEC() function? For example, the following does not work:
>TEXT TO lcSQL NOSHOW PRETEXT 1
>   INSERT INTO MyTable (KeyID, Descript) VALUES (1, 'Test')
>   INSERT INTO MyTable (KeyID, Descript) VALUES (2, 'Test')
>ENDTEXT
>? SQLEXEC(lnHandle, lcSQL)
>Even with a semi-colon after each INSERT command does not work. TIA!


Which driver are you using. My guess is that you are using the MS Oracle driver. Compared to the native Oracle driver, it falls far short of what you can do.

Short of using sql loader - or using command line operations to run a sql script - which would be outside of ODBC - I am not sure you can render multiple lines.

Of course, stored procs is the way to go - but given your limitations, I know that this is likely not feasible for you....

John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform