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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:38:51+00:00 2026-06-14T18:38:51+00:00

How to fill dataset using LINQ with FillDataSet(ds) Method. When iam trying to implement

  • 0

How to fill dataset using LINQ with FillDataSet(ds) Method. When iam trying to implement this code iam getting error like FillDataSet does not exist in current context.

My code is

DataSet ds = new DataSet();
ds.Locale = CultureInfo.InvariantCulture;
FillDataSet(ds);

DataTable products = ds.Tables["emp"];

IEnumerable<DataRow> query =
    from product in dtContext.emps.AsEnumerable()
    select product;

Please tell me how to fill dataset with FillDataSet(ds) Method.
Thank you.

  • 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-06-14T18:38:52+00:00Added an answer on June 14, 2026 at 6:38 pm

    You don’t have to fill a DataSet with LINQ2SQL. Nor do you have to use DataTable etc. All you need is the data context and perform queries on that:

    var query = from product in dtContext.emps
                select product;
    

    query will be of type IQueryable<T> and you can use e.g. a foreach on it to go through its content, or filter it further with a where clause. Why do you want a DataSet?

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

Sidebar

Related Questions

You Have edited script according to v2 i am getting this error on using
I am unable to fill a typed dataset Using reader as New StringReader(My.Resources.sampledata) typedDataset.ReadXML(reader)
How to fill multiple tables in a dataset. I m using a query that
I have a large dataset that load in with a fill method on page
I'm trying to fill my ListView using AsyncTask. Included problem in the comment private
Is there a possibility to get data from dataset without using LINQ? I use
I have a function like this defined in one class: using System; using System.Collections.Generic;
I'm trying to fill DataSet which contains 2 tables with one to many relationship.
I have a DataTable obtained from a SQL DataBase, like this: using (SqlCommand cmd
I'm using the MYSQL .NET connector with an adapter to fill a dataset from

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.