Query a disconnected recordset

Posted on 2006-05-31
Last Modified: 2007-12-19
I have a using disconnected recordset in an application some of which are not tied into a database (this is because in the scenario I have they are much faster than the alternatives).

So far I have been able to work very well using Filter and Sort only and this has been considerably faster than the previous code which used a large collection of classes to store data.

I have come up against a particular point where ideally I would want to run a query against this disconnected recordset in order to get a Distinct list from one of the fields.

If the query was against a database it would along the lines of:


Is there any way I can do this against my disconnected recordset. I can use other techniques if necessary (by checking each record and transfering that field if it doesn't exist in the second disconnected recordset) but this will probably be slower than something that is query based.

I am using VBA so using ADO is considerably faster than anything I can develop in VBA.
Question by:CarlPritchard
    1 Comment
    LVL 77

    Accepted Solution

    Hi CarlPritchard,

    AFAIK you cannot run SQL statements against a recordset.
    If your required result is just a filtered version of the first it is possible to create a second recordset which contains just the filtered records, but if your intention was for more sql manipulation then I don't believe it's possible.


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Introduction If you are not already aware of what you could use a table with sequential integer values for in SQL, you can read Delimited String Parsing in SQL Server 2005 or later ( by BrandonGalderisi (h…
    Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now