Professional Documents
Culture Documents
Problem - REST Query On The Date Field No Longer Works After Upgrading To Version 10
Problem - REST Query On The Date Field No Longer Works After Upgrading To Version 10
Problem:RESTqueryonthedatefieldnolongerworksafterupgradingtoversion10.2
Cause
Map, feature, image, and WFS services now use standardized queries
Using a query on a date field such as the following fails because it is a database-specific WHERE
clause that is not standardized:
WHERE(TIME_DATE<=TO_DATE('10/01/2010','DD/MM/YYYY'))
WHERE(TIME_DATE<=date'20101001')
ArcGIS for Server includes a security option that forces developers to use standardized SQL
queries when working with map, feature, image, and WFS services through REST or SOAP.
This helps prevent SQL injection attacks and also makes it easier for developers and
applications to query ArcGIS Server services.
Note:
Standardizedqueriesareenforcedbydefault,butcanbedisabledbytheserveradministrator.
Solution or Workaround
http://support.esri.com/technicalarticle/000011867
1/2
1/4/2017
Problem:RESTqueryonthedatefieldnolongerworksafterupgradingtoversion10.2
Warning:
Bydisablingthissecurityoption,thesitebecomesmorevulnerabletoSQLinjectionattacks.
1. Open the Administrator Directory and log in as a user with administrative permissions to the site.
The Administrator Directory is typically available at:
http://gisserver.domain.com:6080/arcgis/admin
{"standardizedQueries":"false"}
4. Click Update.
5. Restart ArcGIS for Server.
Related Information
Disabling standardized queries
Query (Operation)
Supported SQL functions in ArcGIS Server
Created: 5/5/2016
Last Modified: 5/5/2016
Article ID: 000011867
Software: ArcGIS for Server 10.2
http://support.esri.com/technicalarticle/000011867
2/2