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 629485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:45:05+00:00 2026-05-13T19:45:05+00:00

I currently have a function that gets some data from the database and puts

  • 0

I currently have a function that gets some data from the database and puts it into a dataset. The return type on my function is GenericCollection (Of CustomerDetails)

If I do this:

Dim dataset As DataSet = Read(strSQL.ToString) 'Gets Data from DB

What’s the most efficient way to map the dataset results to an collection of objects. More importantly, since I’m using GenericCollection, is there a way to do this in which I can call a function from the ObjectType class (CustomerDetails) that would have a means to converting that specific object.

Or is there a way in which I can use a function that would handle all types?

Is there a way to do something like:

Return returnedResults.TransformDataSet(dataset) 

In which returnedResults is an object collection Of CustomerDetails, or would it simply be easier to have TransformDataSet return an object collection Of CustomerDetails by itself?

Thanks for any help.

  • 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-13T19:45:05+00:00Added an answer on May 13, 2026 at 7:45 pm

    Do you plan to generate the dataset, create your collection, then throw away the dataset? If so, I would suggest dispensing with the dataset completely, and use a data reader (SqlDataReader if you are using sql server). You can iterate through the reader and create your collection as you go.

    The dataset is a heavy, xml-based gadget that is great if you need to keep it around and use it for other stuff, but if you are just going to use it as a temporary intermediate data store between the db and you collection, then I would lose it.

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

Sidebar

Related Questions

I'm currently writing an iPhone application which gets some data from the user and
Currently i have this procedure under package that gets user_name when some selects user_id
I am currently scraping some data from the internet and converting into xml documents.
I have script that gets some data using DBI's fetchall_hashref(). Usually it returns a
I currently have a function that will create X tasks of a function based
I currently have a function that grabs the browser windows uri, parses out the
I currently have a Javascript function that uses a string to reference an object
I currently have a function written called saveWorkout that saves an NSMutableArray to another
I have a function that get the current weeknumber from the given date e.g.
I'm working on a .NET component that gets a set of data from the

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.