Build a recordset from three other recordsets?
Hello,
Is it possible to run a query against multiple recordsets in memory to build
a another recordset?
I have tried this simple query below as a start and of course it doesnt
work. It says I am referencing a closed connection.
strTmpQuery = "SELECT F10id, F10ddate, F10brk, F12Test, from adoF10,adoF12
WHERE F12Test = F10id"
With adoTmp
If .State = False Then
.Open strTmpQuery
End If
End With
Thanks for any help,
Greg
Re: Build a recordset from three other recordsets?
You can't query a recordset, period. What you can do is using ADO's
client-side methods like filter and sort you can, sort of, filter out a
subset of the recordset and copy that to another recordset. Now using 3
recordsets is a different game all together. I am afraid that you will have
to manually write code to get yourself a new recordset.
--
Robert Gelb
<gdavis@citynetworks.com> wrote in message news:3958cfa2@news.devx.com...
> Hello,
>
> Is it possible to run a query against multiple recordsets in memory to
build
> a another recordset?
>
> I have tried this simple query below as a start and of course it doesnt
> work. It says I am referencing a closed connection.
>
> strTmpQuery = "SELECT F10id, F10ddate, F10brk, F12Test, from
adoF10,adoF12
> WHERE F12Test = F10id"
>
> With adoTmp
> If .State = False Then
> .Open strTmpQuery
> End If
> End With
>
>
> Thanks for any help,
>
> Greg
>
>
>
Re: Build a recordset from three other recordsets?
Ouch... That's what I was afraid of.
Thanks for your help,
"Robert Gelb" <robertgelbNOSPAMFORME@zdnetonebox.com> wrote in message
news:39597044$1@news.devx.com...
> You can't query a recordset, period. What you can do is using ADO's
> client-side methods like filter and sort you can, sort of, filter out a
> subset of the recordset and copy that to another recordset. Now using 3
> recordsets is a different game all together. I am afraid that you will
have
> to manually write code to get yourself a new recordset.
>
> --
> Robert Gelb
>
> <gdavis@citynetworks.com> wrote in message news:3958cfa2@news.devx.com...
> > Hello,
> >
> > Is it possible to run a query against multiple recordsets in memory to
> build
> > a another recordset?
> >
> > I have tried this simple query below as a start and of course it doesnt
> > work. It says I am referencing a closed connection.
> >
> > strTmpQuery = "SELECT F10id, F10ddate, F10brk, F12Test, from
> adoF10,adoF12
> > WHERE F12Test = F10id"
> >
> > With adoTmp
> > If .State = False Then
> > .Open strTmpQuery
> > End If
> > End With
> >
> >
> > Thanks for any help,
> >
> > Greg
> >
> >
> >
>
>