Error: Too many parameters were provided in this RPC reques

Last post 07-08-2008 9:54 AM by whatispunk. 3 replies.

Sort Posts:

  • Error: Too many parameters were provided in this RPC reques

    05-28-2008, 3:25 AM
    • Loading...
    • p.o.d.
    • Joined on 08-08-2007, 9:39 AM
    • Posts 36

    I made some Linq to sql query

     

     

    var LinqIDs = LinqAllProducts.Where(p => FilteredId.Contains(p.ProductId.ToString()) && p.PropertyName == "PackType" && p.PropertyValue == ScreenType).Select(p => new { ID = p.ProductId });
     FilteredId is List<string> type and contains more than 2100 values
     

    The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.

    I google it but couldn't find solution that really helps.

    Can someone tell me what can I do with it?

     

    My sun is shining where I am
  • Re: Error: Too many parameters were provided in this RPC reques

    07-07-2008, 2:54 PM
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 5:21 PM
    • Winnipeg
    • Posts 721

    Got the same error from this query: 

    string[] after_files =
    	(from emp in gal.nyg_gal_emps
    	 where before_files.Contains(emp.person_id.Value.ToString())
    	 select emp.email + ".jpg").ToArray()
     
    
    

     before_files is also a string[] with 6000+ values.

    Any solution??

    Remember: mark posts that helped you as the answer to aid future readers

    Why UpdatePanels Are Dangerous
    Why You Should Not Place Your Whole Site In An UpdatePanel
  • Re: Error: Too many parameters were provided in this RPC reques

    07-07-2008, 3:21 PM
    • Loading...
    • p.o.d.
    • Joined on 08-08-2007, 9:39 AM
    • Posts 36

     I thought passing more than 2000 parameter to sql wasn't a nice way to solve my problem, so I completely changed my algorithms and built completely different solution.

    I think this is a best way !!!

    My sun is shining where I am
  • Re: Error: Too many parameters were provided in this RPC reques

    07-08-2008, 9:54 AM
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 5:21 PM
    • Winnipeg
    • Posts 721

    I agree.

    I tried a few things to make this work and was surprised by one of the results.

    I tried to do a join with the LINQ to SQL object and a local Generic List (which I thought would work) but it did not.

    Fortunately this is a quick and dirty, one-time solution so I don't need to make it pretty. So what I ended up doing is just creating a local Generic List of my SQL data and then joining this with the other local List. Certainly not very graceful, and not terribly quick either, but it got the job done.

    I think this little experience with LINQ to SQL was enough to keep me from using it. I'll stick to my usual technique of interfacing the db with a webservice and sending xml back and forth. That is, until SP1 comes out and I can try out the Entity Framework.

    Remember: mark posts that helped you as the answer to aid future readers

    Why UpdatePanels Are Dangerous
    Why You Should Not Place Your Whole Site In An UpdatePanel
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter