Print Page | Close Window

Error: expression is more than 8000 chars long

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2996
Printed Date: 22-Jul-2019 at 2:34pm


Topic: Error: expression is more than 8000 chars long
Posted By: ngoel
Subject: Error: expression is more than 8000 chars long
Date Posted: 09-Oct-2011 at 5:32pm

We are runnning Ideablade Version: 3.6.4.1 and getting the error:

{"Unable to construct in-memory query expression - expression is more than 8000 chars long. Please try to restrict the size of this query expression"}

 
The error is happening with only some of the queries irrespective of query length. We manage to run a query with over 100, 000 character with no problem where as other queries with abt 30000 characters return with the above mentioned error.
 
There is no problem with the queries as these queries run with SQL Management studio and return the correct data.
 
Can you please let us know what causes this error and if there is a fix for this?
 
Thanks
Nitin
 
 



Replies:
Posted By: kimj
Date Posted: 10-Oct-2011 at 1:42pm
The error comes when trying to run the query against cache using the DataTable.Select method.   This method does not have a hard ceiling of 8000 characters but does have a limitation as to query complexity, which DevForce for somewhat obscure reasons chose to interpet as an 8000 character limitation.  The character count does not include subqueries, which is why you may see larger queries work successfully.
 
This problem was "alleviated" in the DevForce 3.6.6 release so that the cache query check is not made when the QueryStategy is DataSourceOnly.   Unfortunately the only workaround in earlier releases is to modify the query to suit the limitation.



Print Page | Close Window