Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 439931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:49:21+00:00 2026-05-12T20:49:21+00:00

As my experience with .Net really began as working on existing in-house applications for

  • 0

As my experience with .Net really began as working on existing in-house applications for a company, I feel I’ve picked up so many bad coding practices without realising it. One that i am desperately trying to move on from is that DataSets are used for everything. (I do get that strongly typed datasets have there place and they certainly have some uses…but not for the majority of cases e.g. selecting data)

I’m building up a “helper” class for generic database work…I’ve got a method which returns a data table (for selects etc.) and I guess by default (and most examples in books/online) would use the DataAdapter’s Fill method but certainly as a performance gain, want to replace this with a data reader that reads all the rows and then closes…which I guess is how the Fill method works underneath…but I’d prefer not to simply go for the lazy way if performance on large result sets is potentially going to impact.

Anyway, I can’t for the life of me find an example of a dataReader being used to generically fill a datatable…I’m sure there would be both good and bad examples and therefore an agreed best practice on how to perform such a task. A link (or even a post) to such code would be brilliant! I’m mostly VB.Net but c# is no obstacle.

Note: Sorry if this sounds lazy also, I just figured this sort of example would be posted everywhere…no need to re-invent the wheel etc. thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:49:22+00:00Added an answer on May 12, 2026 at 8:49 pm

    The reason you can’t find an example of a DataReader being used to generically fill a DataTable is because you can do the same thing with the Fill() method in the DataSet, so you would just be reinventing the wheel.

    You’re not going to find a performance benefit by populating the DataTable directly with a DataReader.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really want to know your experience at working with ADO.Net datasets (calling stored
I really wanna do cross platform applications. I have great experience in .NET, so
I am a PHP programmer. I have no .Net coding experience (last seen it
I'm a die-hard .NET developer with limited experience in C++. I'm really familiar with
Am really enjoying my learning experience with ASP.NET with C# so far :). I
I just have development experience in .Net and Windows... And now I really want
I'm new to grails, but have previous experience using .net with c# and linq
I have very little experience with ASP.NET and I am doing some self-training before
I have some experience in ASP.Net and can work my way around it without
I have some experience using parallel extensions in .Net development, but I was looking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.