compare 2 recordsets



What would be the best (fastest) way to do this:
I have 2 ADO recordsets say A and B.
They both have a common field, say ID
Now I need to delete all the records in recordset A where
the value in the field ID is not found in the field in recordset B.
These are values of the datatype Long.
The ID field will be sorted ascending in both recordsets.

Now, I could do this with a double loop, but that could be a bit slow and I
wonder if this could be done better with a filter or find.

I am coding in VBA.
Thanks for any advice.

RBS

.



Relevant Pages

  • ADO recordsets on the client
    ... long time developing an application using disconnected ADO recordsets. ... client as possible, and initially wrote my web application in VBScript ... I then decided to use the http_request object to xfer ADO recordsets to ... technology that WILL WORK? ...
    (microsoft.public.inetserver.asp.db)
  • Remoting Performance Problems
    ... have been benchmarking performance differences between ADO Recordsets via ... We found the MSDN serialization wrapper article ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Combine Recordsets
    ... There is no direct way to merge ADO recordsets. ... recordset using SQL statements, then you probably could use UNION between ... > Dim rs As ADODB.Recordset ...
    (microsoft.public.vb.database.ado)
  • Re: Recordset in Memory
    ... How do I work with ADO recordsets when doing VBA in Access? ... Michael ... and then remove it from memory when done without having to store it to ...
    (microsoft.public.access.modulesdaovba)
  • Re: Trying to create dynamic VBA code (or wasting my time?)
    ... VBA isn't designed to handle self-modifying code. ... Operator As String) As Variant ... how to manipulate recordsets, having done so before. ... Dim stringBuff As String ...
    (microsoft.public.access.modulesdaovba)