Select to view content in your preferred language

Query Task only returns 500 records even after changing MaxRecordCount to 3000 in cfg

3239
4
12-15-2010 02:48 AM
SantoshV
Emerging Contributor
Hi
I have modified the CFG file MaxRecordCount from 500 to 3000
I return about 2028 items but still get the ESRI.ArcGIS.Client.Task.ServiceException

I use Visual Studio 2010
ArcGIS server 9.3.1

please guide...
0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor
Did you restart the server itself (not the service!) after making the change to the configuration file?
0 Kudos
JenniferNery
Esri Regular Contributor
According to this page: http://forums.esri.com/Thread.asp?c=158&f=2396&t=293222
You do the following:
1. Increase the value for MaxRecordCount tag in the configuration file for the service. The default value is 500.
http://webhelp.esri.com/arcgisserver/9.3/dotNet/cfg_file_service.htm
2. You have to restart the ServerObjectManager service from windows services panel for this to take effect.
0 Kudos
SantoshV
Emerging Contributor
According to this page: http://forums.esri.com/Thread.asp?c=158&f=2396&t=293222
You do the following:
1. Increase the value for MaxRecordCount tag in the configuration file for the service. The default value is 500.
http://webhelp.esri.com/arcgisserver/9.3/dotNet/cfg_file_service.htm
2. You have to restart the ServerObjectManager service from windows services panel for this to take effect.


Thank you for your reponse
Yes I have restarted ServerObjectManager service but i am sure that something is missing
my code goes like this

                strQueryTask = "http://Server/ArcGIS/rest/services/sdedata/MapServer/1";
                QueryTask queryTask = new QueryTask(strQueryTask);
                queryTask.ExecuteCompleted += new EventHandler<QueryEventArgs> (queryTask_ExecuteCompleted);
                queryTask.Failed += new EventHandler<TaskFailedEventArgs>(queryTask_Failed);
                ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query();
                query.OutFields.Add("*");
                query.Where = "MSLINK IN " + e.Result "";

Where e.Result return over 2100 records eg("740173,740169,740025,740166,740163,740043......")
Please correct me if something is wrong

cfg file

<Properties>
  <MaxRecordCount>3000</MaxRecordCount>
  <MaxBufferCount>100</MaxBufferCount>
  <MaxImageWidth>2048</MaxImageWidth>
  <MaxImageHeight>2048</MaxImageHeight>
  <IsCached>false</IsCached>
  <CacheOnDemand>false</CacheOnDemand>
  <ClientCachingAllowed>true</ClientCachingAllowed>
  <IgnoreCache>false</IgnoreCache>
  <OutputDir>c:\arcgisserver\arcgisoutput</OutputDir>
  <SupportedImageReturnTypes>URL</SupportedImageReturnTypes>
  <CacheDir>c:\arcgisserver\arcgiscache\webrisdatasde</CacheDir>
  <SOMCacheDir>c:\arcgisserver\arcgiscache</SOMCacheDir>
  <FilePath>\\DEV11\WebRis\webrisdatasde.mxd</FilePath>
  <VirtualOutputDir>http://dev11/arcgisoutput</VirtualOutputDir>
</Properties>
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I am not sure you still run into the same issue.

It could be a limitation of the 'where' clause size.

If you don't initialize the 'Where' clause, are you able to get all the records you are expecting?

If the issue is tied to a big where clause, which API version are you using?
Some enhancements have been made on ArcGIS 2.1 for this point, so if you are not using the latest version, it could worth the try to update.
0 Kudos