Re: Multiple SQL statement problem

From: Bronislovas Balvocius <bronius_at_nafta.lt>
Date: Tue, 20 Aug 2002 12:52:11 +0200
Message-ID: <3d621f44_at_news.takas.lt>


In my oppinion, Oracle OleDB can return only one rowset at a moment, so why not to try

str1 = "select * from test1 where id = 'www' union select * from test2 where id = 'eee';"
 to have all results in one rowset (of course if union is possible).

Bronislovas

"evgenyv" <evgenyv_at_yahoo.com> wrote in message news:1716024.1029831128_at_dbforums.com...
>
> Hi!
> A can't run the multiple sql statement with Oracle DB. I'm using ADO
> 2.7.
> What is wrong in follow example?
>
> 'm_sConnStr = "Provider=MSDAORA;Password=aaa;User ID=user;Data
> Source=ds1"
> m_sConnStr = "Provider=OraOLEDB.Oracle;Password=aaa;User ID=user;Data
> Source=ds1"
> m_Conn.Open m_sConnStr
> m_Conn.CursorLocation = adUseClient
> Dim str1 As String
> Dim str2 As String
> Dim str3 As String
>
> str1 = "select * from test1 where id = 'www' ;" & vbCrLf
> str2 = "select * from test2 where id = 'eee';"
> str3 = str1 + str2
> Set m_Rs = m_Conn.Execute( str3 ) - throw error "Invalid character" (
> but this statement does run properly from Oracle SQL+ )
> m_Rs.Close
>
> BTW in MSSQL does work properly.
>
> Thanks in advance
>
> --
> EvgenyV
>
>
> Posted via http://dbforums.com
>
Received on Tue Aug 20 2002 - 12:52:11 CEST

Original text of this message