MYSQL: Multiple Recordsets?

admin

Administrator
Staff member
My Configuration: MySql, ASP, Windows 2000(IIS 5.0)
Is it possible to select multiple recordsets from a mysql database in a single asp page?

I try doing something similar to this:

'Create the SQL string
sSQL = "SELECT categoryId, categoryName FROM Categories WHERE categoryId > 3"
sSQL = sSQL & ";SELECT RegionId , RegionDescription FROM Region"

'Define our connection string
sConnectString = "DRIVER={sql server};SERVER=localhost;" & _
"DATABASE=northwind;UID=sa;PWD="

'Retrieve the multiple Recordsets
set oRS = Server.CreateObject("ADODB.Recordset")
oRs.Open SQL, sConnectString

'Work with the first Recordset (the Categories table)
Do While Not oRs.EOF
'......some processing here
oRs.MoveNext
Loop

'Move to the next Recordset
Set oRS = oRS.NextRecordset()

'Work with the second Recordset (the Region table)
Do While Not oRs.EOF
'......some processing here
oRs.MoveNext
Loop

'Clean up...
oRS.Close
Set oRS = Nothing

And I get this error when executing the asp page:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

ODBC driver does not support the requested properties.

Does Anyone have any wisdom on what my problem is and how to fix it? I have spent countless hours scouring the net for an answe with no luck, Please Help. Thanks
 
Back
Top