p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: How to run Multiple SQL statements with ADO and Oracle

Message #1 by "Deshpande, Amit (CAP, Brilasoft)" <Amit.Deshpande@g...> on Fri, 23 Mar 2001 15:26:03 -0500
> Hi ,
> I am using VB6 and Oracle 7.3 in a web based environment
> I want to insert into 2 tables.
> How do I do ?
> I know i have done the same in SQL Server using 2 sql statements 
> by ";" semicolon.
> But its failing when Oracle used.
> e.g. sSQL= "select * from customer;select * from products" 
The problem is with the semicolon.  I experience this same problem when 
code that worked fine in Oracle 8.1.6 started giving this error in the 
ODBC call in an older version of Oracle.  ORA-911 generally occurs when 
parsing a SQL statement and an invalid character is found in the statement.

Why not simple send two statements?

Set objRecordset1 = objConnection.Execute("select * from customer")
Set objRecordset2 = objConnection.Execute("select * from products")

Hope this helps,

Ken Lee

  Return to Index