InsaneProgrammer
Programmer
Is it possible to use multiple recordsets with an Oracle Database? If your connecting to SQL Server or mySQL you can do somthing like this:
This method reduces the number of recordsets that you create and the number of trips your program makes to the database. When I try to do this from VB or an ASP page to an Oracle 8i Database I get the following error:
ORA-00911: invalid character
Any help would be greatly appreciated.
Code:
private sub Example
Dim sSQL
Dim oRS
Dim oCON
set oCON=server.createobject("ADODB.Connection")
oCON.Open ("SOME_CONNECTION_INFO")
sSQL = "Select * from Table1"
sSQL = sSQL & ";Select * from Table2"
sSQL = sSQL & ";Select * from Table3"
set oRS=Server.CreateObject("ADODB.Recordset")
oRS.Open sSQL, oCON
if not oRS.eof then
'Do Some Calculations on the Data from Table1
end if
set oRS = oRS.NextRecordset
if not oRS.eof then
'Do Some Calculations on the Data from Table2
end if
set oRS = oRS.Nextrecordset
if not oRS.eof then
'Do Some Calculations on the Data from Table3
end if
oRS.Close
oCON.Close
set oRS = Nothing
set oCON = Nothing
End Sub
ORA-00911: invalid character
Any help would be greatly appreciated.