Re: compare 2 recordsets
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 12:21:04 -0400
RB Smissaert wrote:
Would Seek know that the rs is sorted so stop seeking if it is past
the sought value?
?? I don't undertand the question. Maybe you can look at the documentation
and answer it for yourself:
http://msdn2.microsoft.com/en-us/library/ms675532.aspx
This made me think that maybe a double loop could be faster as you
could set the start
point and do exit do or exit loop when it has past the value.
What complicates matters is the delete. What happens to the position
in the recordset after
a delete of the one single currrent record? Will it be in the next of
the previous.
How would a filter work?
First of all, performance compared to SQL is never going to be what you want
it to be. Cursors are SLOW. That said:
Something like this:
rsNode.MoveFirst
Do While rsNode.EOF = False
strCriterium = strParentField & " = " & rsNode.Fields(lNodeField)
rsParentNode.Filter = strCriterium
If rsParentNode.EOF Then
rsNode.Delete adAffectCurrent
End If
rsNode.MoveNext
Loop
--
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
- 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):