Is it possible to use multiple recordset objects in a query?

L

Lonnie M.

I am wondering if it is possible to query two recordsets into another
recordset object. I haven't seen examples of querying an ADO recordset
in the source property of the recordsets open method, but I believe it
is possible. Below is the psuedo code for what I am trying to
accomplish:

rst2.Open _
Source:="SELECT rst1.Fields.Item(1), rstP.Fields.Item(0),
rstP.Fields.Item(1), rstP.Fields.Item(2), rstP.Fields.Item(3),
rstP.Fields.Item(4) " & _
"FROM rst1, rstP " & _
"JOIN Pricing ON rst1.Fields.Item(2) = rstP.Fields.Item(0) " & _
"ORDER BY rst1.Fields.Item(1);", _
Options:=adCmdText

I can create the queries behind rst1 & rstP without a hitch, but I am
running into trouble on figuring out how to build rst2 based on a
query of the recordsets rst1 & rstP.

Thank you in advance, Lonnie M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top