Re: compare 2 recordsets
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 11:24:32 -0400
RB Smissaert wrote:
I now have something that does work (and that is a start), but
performance is not very good:
rsNode.MoveFirst
Do While rsNode.EOF = False
strCriterium = strParentField & " = " & rsNode.Fields(lNodeField)
If rsParentNode.FindNext(strCriterium) = False Then
rsNode.Delete adAffectCurrent
End If
rsNode.MoveNext
Loop
I think the FindNext method is the problem and maybe this is better
with a double loop,
knowing that both recordsets are sorted ascending of the ID field.
I think you'll be better off using either Seek or Filter rather than
FindNext. I would be surprised if a loop would outperform either of those
methods.
And make sure you use disconnected client-side recordsets for this so you
can free up the connections.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: compare 2 recordsets
- From: RB Smissaert
- Re: compare 2 recordsets
- References:
- compare 2 recordsets
- From: RB Smissaert
- Re: compare 2 recordsets
- From: Bob Barrows [MVP]
- Re: compare 2 recordsets
- From: RB Smissaert
- compare 2 recordsets
- Prev by Date: Re: compare 2 recordsets
- Next by Date: Re: compare 2 recordsets
- Previous by thread: Re: compare 2 recordsets
- Next by thread: Re: compare 2 recordsets
- Index(es):