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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:59:27+00:00 2026-05-29T07:59:27+00:00

So I recently asked the following questions: Reading A Fixed Format Text File –

  • 0

So I recently asked the following questions:

Reading A Fixed Format Text File – Part 2
Reading A Fixed Format Text File

I was finally able to read the access database by using the following code:

string DATABASE_PROVIDER = "Provider=Microsoft.ACE.OLEDB.12.0";
string CVS Application.StartupPath + ""\\Database.accdb";
string DATA_SOURCE = "Data Source" + CVS;
string connectionString = DATABASE_PROVIDER + DATA_SOURCE;
string TABLE = " FROM STUFF";
string SELECT = "SELECT CODE, NAME, ICON, FUNCTION;
string StringQueryCmd = SELECT + TABLE;

OleDbConnection MyConnection = new OleDbConnection(connectionString);
OleDbCommand Command = OleDbCommand(StringQueryCmd,MyConnection);
OleDbAdapter MyDataAdapter = new OleDbAdapter(Command);
DataSet MyDataSet = new DataSet();
DataTable MyDataTable = new DataTable();
MyConnection.Open();
MyDataAdapter.Fill(MyDataSet,"STUFF");
MyConnection.Close();

I am attempting to leverage LINQ to DATASET by using the follow block of code:

var query = (
from order in MyDataTable.AsEnumerable()
where order.Field<int>("CODE") >= 41
select new
{
CODE = order.Field<int>("CODE"),
NAME = order.Field<string>("NAME"),
ICON = order.Field<string>("ICON"),
FUNCTION = order.Field<string>("FUNCTION")    
}
);

The result of the query returns no results, I should be getting thousands of results, there any fundamentally wrong with my query? There any other way I generate a result that limits the information from the DataTable?

I need to be able to provide the a query ( or some other solution ) a regular expression that matches the “NAME” column and only get several results. I am going to attempt to use ability for a regular expression to Match ( which is a boolean statement ) against each Name.

  • 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-29T07:59:28+00:00Added an answer on May 29, 2026 at 7:59 am

    You have not initialized MyDataTable by a data after instantiation, you have filled in data set but not a data table. So just try out MyDataSet.Tables[0] instead of MyDataTable.AsEnumerable()

    // DataSet filled in but data table still empty!
    MyDataAdapter.Fill(MyDataSet,"STUFF"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I was asked the following questions in an interview: How will you do
Recently I was asked the following question at interview. What are the different way
Please, help me clear my mind on the following question. Recently I asked a
I recently attended an interview and was asked the following question. There are two
I have recently been receiving the following error whenever I am asked to supply
I recently asked a question on using volatile and was directed to read some
I recently gave an interview at a company where they asked me the following
I've asked a lot of jQuery questions recently as I'm trying to use it
Recently I was asked the following in a Interview: There is a process/application A
Recently in a job interview I was asked this following question (for Java): Given:

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.