
Open multiple recordsets using single parameterized command object
Hi,
I think I'm missing something. I am trying to use a parameterized command
object in VB6 to open multiple recordsets, each the result of a query based
on a different parameter. Here is a very simplified version of what I'm
doing:
DE.RunQuery myparameter
set rs1 = DE.rsRunQuery
....
....
....
DE.RunQuery differentparameter
set rs2 = DE.rsRunQuery
where DE is an instance of a DataEnvironment and RunQuery is my Command
object. The problem is that when I try to run the second query using my
second parameter, I get an error saying that I'm not allowed to do that
while it's in the open state.
The goal I'm trying to achieve is to use the data in each recordset to
populate a different instance of an MDI child form, but I don't want to
create multiple command objects if I don't have to. I figured a
parameterized command object was the way to go since the queries are
basically the same aside from the single parameter. However, I'm running
into the troubles described above.
Could someone please point me in the right direction or perhaps suggest a
better way to do what I'm trying to do?
Thanks,
Jordan