How to Query (select) ADO.NET Recordset

I have a question about the best way to retrieve and query records in memory. Below is the sample of the data. Basically what I want to do is:

If a user picks a repcode from a dropdown is pick all the condcodes associated and populate a different combobox. Then when the user picks a condcode from the next dropdown dropdown populate another combobox with the associated simcodes.

Normally I would just run a series of queries to get the next set of rows. But this form will be used with a high frequency and I am trying to minimize the DB calls.

I am open to any ideas on this, collections, datatables, etc.

Thanks for your help and attention.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alfred A.Commented:

In my opinion, the use of DataTables in a DataSet would be one approach I would do.

You can use DataTables.Select Method to filter and retrieve information from memory rather than DB access.

You can also use a generic list and store it in your dataset.

I hope this helps.
fullbuggAuthor Commented:
I agree... Would you happen to have a VB.NET version?
Alfred A.Commented:
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

If you have data in one datatable and another datatable containing the records then


dTable.DefaultView.RowFilter = "condcode='" & combobox1.Text & "'"

combobox2.DisplayMember = "Simcode"
combobox2.ValueMember = "Simcode"
combobox2.DataSource = dTable.DefaultView

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fullbuggAuthor Commented:
Sorry about the delay in getting to this. I only get one day a week to write any code for this project.

Thanks again!
Would you explain the grade please?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.