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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:04:37+00:00 2026-06-12T10:04:37+00:00

OK, what I am trying to do is fetch two datasets from their respective

  • 0

OK, what I am trying to do is fetch two datasets from their respective databases and join them using a Linq query, formed by the Join extension method. The Linq query did work before, but after some refactoring (in other parts of the code) it does not anymore. I really fail to see the difference.

I have expanded the KeySelectors and the ResultSelector to be able to put breakpoints in them. The two enumerables (localSeq and remoteSeq) work fine, they got the right number of elements etc. The elements of both sequences are formatted as Object(). The KeySelectors (implemented by the function CompositeJoinKeySelector) also seems to work. What this function is supposed to do is select the right fields from every element, so that the .Join method knows how to check for equality. It seems to be this step (check for equality) that fails.

When I step through the code, the linq query loops through both the datasets and executes the KeySelector. This seems to return the intended values. Afterwards, however, it does not break in the ResultSelector. It seems to me that this means it never got to process the result, because he did not find matching “rows”. This is quite weird, because I stepped through the execution and both KeySelectors return a two-dimensional Object array and matching entries certainly exist.

Is there any way to see this (presumably) nested loops process and see where the equality comparison fails?

            Dim LocalSeq As IEnumerable(Of Object()) = From locRow As Object() In LocalArray
        Dim RemoteSeq As IEnumerable(Of Object()) = From remRow As Object() In RemoteArray

        Dim joinSeq As IEnumerable(Of Object()) = LocalSeq.Join(Of Object(), Object, Object())(RemoteSeq, _
                                                                                               Function(locRow As Object())
                                                                                                   Dim locRes As Object() = CompositeJoinKeySelector(locRow, LocalKeyList)
                                                                                                   Return locRes
                                                                                               End Function, _
                                                                                               Function(remRow As Object())
                                                                                                   Dim remRes As Object() = CompositeJoinKeySelector(remRow, RemoteKeyList)
                                                                                                   Return remRes
                                                                                               End Function, _
                                                                                               Function(locRow As Object(), remRow As Object())
                                                                                                   Dim joinRes As Object() = JoinRowArrays(locRow, remRow, FinalJoinSelectColumnList)
                                                                                                   Return joinRes
                                                                                               End Function)

        Return joinSeq.ToArray()
  • 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-12T10:04:38+00:00Added an answer on June 12, 2026 at 10:04 am

    Okay, it appears that the comparison failed because a reference-compare was used by default. So, I solved the problem by implementing an IEqualityComparer.

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

Sidebar

Related Questions

I'm trying to join two tables from DB but I need to join them
I am trying to fetch records based on two dates from sql server... Select
I'm trying to join one table, with two other tables, using a single column
W was trying to fetch join over three levels: JOIN FETCH entity1.collection1.collection2 // two
I'm trying to fetch information from a JSON web service with this code, using
I am trying to join two tables. One being the sys.databases table and the
I am trying to join two EJB's using EJBQL (with an underlying MySQL data
I'm trying to query a single result from two tables in my database. Here
I am trying to view values from two separate tables using a foreach loop.
I'm trying to fetch a value from a NSString that is between two specific

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.