Here is a basic example, the magic line is;
Set rs = rs.NextRecordSet
Pseudo coded so apologies if there are some typos.
Dim cmd, rs, sql, connstring
Set cmd = Server.CreateObject("ADODB.Command")
connstring = "your connection string here"
sql = ""
sql = sql & "SELECT col1, col2 FROM table1 WHERE col0 = ?" & vbCrLf
sql = sql & "SELECT col1, col2 FROM table2 WHERE col0 = ?"
With cmd
.ActiveConnection = connstring
.CommandType = adCmdText
.CommandText = sql
.Parameters.Append(.CreateParameter("@table1id", adInteger, adParamInput, 4))
.Parameters.Append(.CreateParameter("@table2id", adInteger, adParamInput, 4))
'Return first Recordset for table1
'id1 and id2 contain your values to pass in your parameters.
Set rs = .Execute(, Array(id1, id2))
'Do something with your data, use .GetRows() to return an array or something
'Then return your second Recordset for table2
Set rs = rs.NextRecordSet
'Do something with your data, use .GetRows() to return an array or something
Call rs.Close()
Set rs = Nothing
End With
'Bit of cleanup
Set cmd = Nothing