MSDE - VB.NET - Fastest way to retrieve 5000 records?

Posted on 2005-04-26
Last Modified: 2010-03-19
Hi. I'm fairly familiar with Microsoft Access & MySQL as far as VB.NET programming is concerned.

In MySQL, the fastest way to retrieve data is to use a datareader.

Is this also true for MSDE?

- I'm not concerned with updates.
- I simply want to do "Select from table where Something=something" and look at the results (in my code) and go on with life.

I need the absolute fastest way to do this.


Question by:oxygen_728
    LVL 75

    Expert Comment

    by:Anthony Perkins
    >>Is this also true for MSDE?<<
    Yes.  But this question would be best posted in a more appropriate Topic Area, such as:

    Author Comment

    Sorry it seemed logical that MSDE experts would know how to integrate MSDE databases into VB.NET
    LVL 75

    Accepted Solution

    For the most part, yes, that is why I used the word "appropriate".  

    The question is actually for the most part unrelated to the backend database (and strictly speaking unrelated to .NET, per se), you could have said DB2, Oracle or MS Access instead of MSDE.  It has everything to do with the database interface you use, in your case ADO.NET.  My point is that the question could have been phrased without regard to the database something like this:
    What is the fastest way to retrieve a resultset using ADO.NET

    The answer is (still) using a Data Reader.

    The only caveat (that is why I say "for the most part") is that since you are using MSDE you should use SQLDataReader (from the System.Data.SqlClient namespace) as opposed to the OleDbDataReader (from the System.Data.OleDb namespace)

    That is why I suggested you post in more appropriate TA. But if you get the help you need here, more power to you.  

    Author Comment

    Thanks for the help. I'll try that out as soon as i get time

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I recently came across an interesting Question In EE ( and was puzzled about how to achieve that using SSIS out of the box tasks, which was i…
    Introduced in Microsoft SQL Server 2005, the Copy Database Wizard ( is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now