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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:40:13+00:00 2026-05-22T16:40:13+00:00

In a project I am currently working on, I need to access 2 databases

  • 0

In a project I am currently working on, I need to access 2 databases in LINQ in the following manner:

  1. I get a list of all trip numbers between a specified date range from DB1, and store this as a list of ‘long’ values

  2. I perform an extensive query with a lot of joins on DB2, but only looking at trips that have their trip number included in the above list.

Problem is, the trip list from DB1 often returns over 2100 items – and I of course hit the 2100 parameter limit in SQL, which causes my second query to fail. I’ve been looking at ways around this, such as described here, but this has the effect of essentially changing my query to LINQ-to-Objects, which causes a lot of issues with my joins

Are there any other workarounds I can do?

  • 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-22T16:40:13+00:00Added an answer on May 22, 2026 at 4:40 pm

    as LINQ-to-SQL can call stored procs, you could

    • have a stored proc that takes an array as a input then puts the values in a temp table to join on
    • likewise by taking a string that the stored proc splits

    Or upload all the values to a temp table yourself and join on that table.

    However maybe you should rethink the problem:

    • Sql server can be configured to allow query against tables in other databases (including oracle), if you are allowed this may be an option for you.
    • Could you use some replication system to keep a table of trip numbers updated in DB2?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a c# project, where I need to access Outlook.
I am currently working on a project where I need to access a build
In the project I am currently working on, we have the need to develop
I'm currently working on a pet project and need to do C++ development on
I am currently working on a project where users need to be able to
I am currently working on a project where I need to generate multiple values
I am currently working on a large project and will relatively soon need a
Currently we are working on a project in which we need to come up
I am currently working on a project that requires to solve the following problem:
Good morning, I am currently working on a project in which I need to

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.