Vb6 data filtering

Posted on 2005-04-17
Last Modified: 2010-08-05
For some reason I cant get filter to work.

I do something like :

adoRec.Filter = "Column_Name = " & variable

it should be that simple no ? Dont know why it wont work. Do I have to have a refference in my application ?

May you guys have a better suggestion.

I have log files that I have to parse and then import into the database. There can be upwards of 5,000 lines per file.

I have to take each line, see if it is already in the database. If not, I have to compare if it is an existing location or not, if it is an existing computer or not.

As you can see it can get extremely time consuming.

I thought if I could use the filter it would be faster because I wouldn't have to requery every time I pass through a line.

Your help would be appreciated.
Question by:intertise
    LVL 28

    Expert Comment

    Have you tried:

    adoRec.Filter = "Column_Name = '" & variable & "'"

    Author Comment

    no, but I will, thank you

    Author Comment

    Here is the code

        rsMachine.Filter = "Machine Name = '" & UCase(strMachineName) & "'"
    gives me error code 3001

    arguments are of the wrong type, out of range or in conflict.

    LVL 6

    Accepted Solution

    tried this?

    rsMachine.Filter = "[Machine Name] = '" & UCase(strMachineName) & "'"

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    734 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