返回顶部
首页 > 资讯 > 数据库 >Exception: Too many parameters were provided in this RPC request. The maximum
  • 700
分享到

Exception: Too many parameters were provided in this RPC request. The maximum

2024-04-02 19:04:59 700人浏览 泡泡鱼
摘要

Exception: Too many parameters were provided in this rpc request. The maximum is 2100. [Microsoft]

Exception: Too many parameters were provided in this rpc request. The maximum is 2100.

 

[Microsoft][sql Native Client][SQL Server]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.


SQL语句的报错


如果是SELECT查询OR条件语句形如:SELECT * FROM tablename WHERE x1 OR x2 OR x3 OR x4 OR ... OR x2101,OR条件个数超过2100就会报错,可以改为UNION ALL。


如果是SELECT查询IN条件语句形如: SELECT * FROM tablename WHERE columnname IN (1,2,3,4,5, ........ , 2101 ),IN参数个数超过2100,会报上面的错误。可以创建临时表,将这些数据写入临时表,再关联。

--Create new table   
Create Table temp (myvalues uniqueidentifier)

-- Join new table with your table   
SELECT t1.*    
FROM tablename t1    
JOIN temp t2 
ON t1.myvalues = t2.myvalues


存储过程和函数的报错


对于存储过程和函数,参数最大个数为2100

参见如下限制:

https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server

您可能感兴趣的文档:

--结束END--

本文标题: Exception: Too many parameters were provided in this RPC request. The maximum

本文链接: https://lsjlt.com/news/37393.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作