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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:14:12+00:00 2026-06-13T12:14:12+00:00

I am building a linq-to-sql web application and I’ve encountered a problem. I am

  • 0

I am building a linq-to-sql web application and I’ve encountered a problem.
I am trying to use the user’s friends list fetched in real time from facebook, and then joining them against SQL tables.

For that I am usually using .Contains(friends) where friends are the User IDs.
the problem is that LINQ will not be able to use .contains(friends) when friends are more than 2100 values and I am getting an exception.

So my question is – what is the best practice for reading on the fly the user’s friends and joining that with my SQL tables?

Thanks y’all!

  • 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-13T12:14:13+00:00Added an answer on June 13, 2026 at 12:14 pm

    Issue multiple queries, each querying at most 2100 values. The problem that you are seeing is that SQL Server can only accept 2100 SQL parameters per query batch.

    In that sense your problem has nothing to do with Facebook. It is a SQL Server limitation triggered by the type of query that LINQ to SQL decides to send (and there is no way to make it send the query differently).

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

Sidebar

Related Questions

I am building a c# - linq - sql server winforms/asp.net application, accessing a
We are building an MVC 1.0 application right now and using Linq -> SQL
I am building a classified-ads website using asp.net web forms and linq-to-sql. The items
I am building a web application which searches its SQL database for the query
I have this contact list which I'm building using LINQ to SQL. The query
I am building an MVC3 application and I am using Linq to sql for
I'm building a generic Repository<T> class that supports Linq to SQL, and I'd like
I'm building a LINQ query dynamically based on user input, and I want to
Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI
I'm building an ASP.NET MVC site that uses LINQ to SQL. In my search

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.