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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:43:27+00:00 2026-05-22T17:43:27+00:00

Dim ds = From a In db.Model Join b In db.1 On a.id Equals

  • 0
Dim ds = From a In db.Model
           Join b In db.1 On a.id Equals b.ID
           Join c In db.2 On a.id Equals c.ID
           Join d In db.3 On a.id Equals d.ID
           Join f In db.4 On a.id Equals f.ID
   Select a.id, a.Ref, a.Type, a.etc

Above is my linq query. At the moment I am only getting the first row from the db returned when there are currently 60 rows. Please can you tell me where I am going wrong and how to select all records.

Thanks in advance!

UPDATE:

When I take out all the joins like so:

 Dim ds = From a In db.1, b In db.2, c In db.3, d In db.4, f In db.5
Select a.id, a.Ref, a.type, b.etc, c.etc, d.etc

I get a system.outofmemory exception!

  • 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-22T17:43:28+00:00Added an answer on May 22, 2026 at 5:43 pm

    You’re only going to get a row produced when all of the joins match – in other words, when there’s a row from Model with an AP, an Option, a Talk and an Invoice. My guess is that there’s only one of those.

    LINQ does an inner join by default. If you’re looking for a left outer join (i.e. where a particular row may not have an Invoice, or a Talk etc) then you need to use a group join, usually in conjunction with DefaultIfEmpty.

    I’m not particularly hot on VB syntax, but this article looks like it’s what you’re after.

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

Sidebar

Related Questions

I have a fairly simple Linq query (simplified code): dim x = From Product
When I execute this query: Dim Var Var = ("select max(Autonumber) from tblAutonumber") DoCmd.RunSQL
Is this: Dim mydata = (From c In dc.Table Select New With {c.ID}).Count any
Dim MyQuery = From c In xdoc.Descendants() _ Where c.Attribute(OriginY) IsNot Nothing _ Order
I've tried this example directly from MSDN: Dim Screens() As System.Windows.Forms.Screens and I can't
What's the difference between reading a value from an SqlDataReader using this syntax: Dim
I'm pulling an RSS feed from a remote location using ServerXmlHttp: Dim httpRequest set
I'm using the following code to dragdrop data from listbox into another applications: Dim
How do I convert the following line of code from VB.NET to C#. Dim
I'm having trouble getting my head around converting a traditional SQL aggregate query into

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.