Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Executing multi-line sql commands via ADO/Oracle drivers

541797Oct 25 2006 — edited Oct 31 2006
Hi,
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 9.02.00.00
Hope someone can help
Thanks
Paul
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2006
Added on Oct 25 2006
1 comment
3,584 views