Print Page | Close Window

Problem with a RDBQuery

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=630
Printed Date: 11-Jun-2026 at 12:22pm


Topic: Problem with a RDBQuery
Posted By: Makarov
Subject: Problem with a RDBQuery
Date Posted: 20-Dec-2007 at 8:21am
Hi.
I have following problem with a RDBQuery.
When number of arguments for EntityQueryOp.In clause exeeds 2100, an error occurs:
"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"



Replies:
Posted By: IdeaBlade
Date Posted: 21-Dec-2007 at 2:34pm
I am not sure that I understand your complaint.  Do you think that the number of arguments in the EntityQueryOp.In clause should be infinite?  Even if the number of arguments in DevForce could be increased, I am sure that there must be some limits in the database.


Posted By: Makarov
Date Posted: 24-Dec-2007 at 6:45am
You see, we were surprised, that this restriction was not mentioned in the manual, and wasn't detected by object itself.
Are there any methods to reduce given RdbQuery to execution-safe fragments?
We are trying to implement one algorithm, but there are some problems, because constructor new RdbQuery(RdbQuery query) creates a copy, which fields refrence fields of initial object, not the copies.


Posted By: davidklitzke
Date Posted: 26-Dec-2007 at 11:12am
The actual source of the error is coming from the SQL Server which has a limitation of 2098 parameters that it will accept in a SQL statement.  I assume that this number may change from one database to another.  There is also a hard coded limit of 8044 characters that the SQL Server will accept in a SQL statement.
 
You will need to break up your long query into a sequence of smaller queries to handle these very large queries.


Posted By: davidklitzke
Date Posted: 26-Dec-2007 at 11:32am

The error message that you are getting is from SQL Server, not DevForce,  SQL Server has a limitation of 2100 parameters that it will accept in a SQL statement.  There are other limitations as well.  For example, a SQL statement may not contain more than 8044 characters.

 
To handle very long queries, you will need to break the large query into multiple smaller queries.



Print Page | Close Window