Home » Infrastructure » Windows » Executing multi-line sql commands via ADO/Oracle drivers
Executing multi-line sql commands via ADO/Oracle drivers [message #199966] Fri, 27 October 2006 03:52
Messages: 2
Registered: October 2006
Location: UK
Junior Member
I'm trying to do multiple inserts via my ADOConnection object with the following as my SQL parameter.
"insert into TMP_PORTFOLIO values ('3011');"
i.e. (from VB):
Call adoConnnection.Execute(strSQL)
This works fine but I want to execute more than one insert at a time e.g.
"insert into TMP_PORTFOLIO values ('3021');
insert into TMP_PORTFOLIO values ('3478');"
,where there is a crlf between the statements, I get the following error
"[Oracle][ODBC][Ora]ORA-00911: invalid character".

So I try it wihout the crlfs and just the semi-colons and it still doesn't work. Is it possible to do this? It is fine on Sybase. I guess the Oracle provider is stripping out the crlfs. I don't want to have to loop round an array calling multiple ADO executes.

Here's my provider details Provider=MSDASQL.1;DRIVER=Oracle in OraHome92;
Driver version is
Hope someone can help
Previous Topic: How to insert/retrieve a BLOB from VB
Next Topic: Oracle client version for .Net 2.0
Goto Forum:

Current Time: Fri Oct 21 17:14:22 CDT 2016

Total time taken to generate the page: 0.15124 seconds