ADO recordset problem in recursive routine



Hi

I'm converting some code which uses DAO to ADO. Basically it's a very simple
recursive routine (written in VBA) that works its way through a self
referencing table (with any number of levels - parent child etc.) in order
to populate a tree control.

In the original (DAO) version there are two recordsets, one containing all
the records (rsAll) and another containing the children of the current rsAll
record (rsChildren). This works just fine and is pretty fast...

Problem is I have used exactly the same technique in ADO but the rsChildren
seems to be permanently bound to the rsAll so when the recursion reaches a
level where there are no children it stops as rsAll (filtered) has zero
records, so when returning to the previous call the cursor is effectively at
the end of the recordset, which now has a count of zero too :@(

Any one know whats going on?

I can post some code if necessary, t's on another machine, but I got a
feeling there's no need as I'm probably just trying to do something thats
not possible in ADO...

Cheers

Mark


.



Relevant Pages

  • Re: How to enforce subtypes/supertypes in Access 2000?
    ... DAO is the native object model for Jet databases and, as such, is the ... ever need ADO. ... Private Sub SetContactType() ...
    (microsoft.public.access.tablesdbdesign)
  • Re: ADODB reference?
    ... will play around with DAO in A2007 after I finish my current test ... I had one other question about ADO connection string syntax in case ... to a variety of data sources but not designed specifically for Access. ...
    (microsoft.public.access.modulesdaovba)
  • Re: DAO Add/Edit/Update Methods
    ... BTW, I didn't say you can't use ADO and bound forms, but bound forms do ... thus why I included an update current record command ... Just so you know, when I have used DAO with the dynamic cursor keyset, I ... still ran into the issue of the EditMode property not showing the edit ...
    (microsoft.public.access.modulesdaovba)
  • Re: query mdb on network into Word. Access.exe not on workstation
    ... not sure that ADO uses DAO. ... >> turned out that the new workstations did not have the ... >> have ADO 2.8 because it was installed with the Office installation. ...
    (microsoft.public.access.externaldata)
  • Re: query mdb on network into Word. Access.exe not on workstation
    ... adodb provider for Jet did not know what to do. ... not sure that ADO uses DAO. ... >>> have ADO 2.8 because it was installed with the Office installation. ...
    (microsoft.public.access.externaldata)