DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Build a recordset from three other recordsets?

  1. #1
    Guest

    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




  2. #2
    Robert Gelb Guest

    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
    >
    >
    >




  3. #3
    Guest

    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
    > >
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center