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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:25:56+00:00 2026-06-15T16:25:56+00:00

I have been researching this for some time, so if I missed a topic

  • 0

I have been researching this for some time, so if I missed a topic somewhere please point me in the right direction and accept my apologies.

I am performing a LINQ query on an incoming DataTable and setting up new columns based on the filtering done. The information being passed in is a single row containing the columns: CompanyName, CustomerID, LastName, FirstName, ContactTitle.

My question is, am I over-filtering the information to the point where it will return nothing to the DGV, or have I done something else wrong?

What I am trying to do is query another table based on the information passed in from the DataTable. Here is my query:

            var query = (from id in IncomingOrderDetails.AsEnumerable()
                    from o in db.Orders
                    from c in db.Customers
                    from r in db.Regions
                    where (id.Field<int>("OrderID") == o.OrderID)
                    where (o.CustomerID == c.CustomerID)
                    where (c.Region == r.RegionDescription)
                    select new
                    {
                        CustomerID = c.CustomerID,
                        CompanyName = c.CompanyName,
                        ContactName = c.ContactName,
                        RegionDescription = r.RegionDescription,
                        Country = c.Country,
                        Phone = c.Phone
                    }).ToList();

        custInfoDGV.DataSource = query;
  • 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-15T16:25:57+00:00Added an answer on June 15, 2026 at 4:25 pm

    This line:

     where (c.Region == r.RegionDescription)
    

    …looks dubious. If c.Region = r.RegionDescription, why do you need to bring in r at all? All you use it for is retrieving the RegionDescription.

    I don’t know your tables, but joining two fields that don’t match would certainly produce 0 records returned. 🙂

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

Sidebar

Related Questions

Hopefully, someone here can give me some light. I have been researching this issue
I have been researching this topic for a few days now and i'm still
I've been wondering about this for some time. In CouchDB we have some fairly
This is something I have been struggling about for some time now. The thing
Ok, I've been researching the best way to solve this problem for some time
I have been researching this issue pretty extensively and cannot seem to find an
I have been researching this for a while but got no convinced answer. From
I have been researching this for a few hours and I feel that I
I have been researching all over the internet about this, and unfortunately cannot find
I'm looking to do some mobile-specific layouts in my app, and have been researching

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.