Using feature services to create a check-out database for iOS Runtime.
I noticed that if I try to query the feature services using the getdate() function it fails in 10.2.2 where it worked fine in 10.1 or earlier.
For example - executing a query against the REST endpoint for a feature layer with an AGSDate field using "WHERE dateField > getdate() - 7" will return all records with a date value within the last 7 days. Works like a charm in 10.1, fails with an error in 10.2
Is this a known bug?
Solved! Go to Solution.
Hi Michael,
You are most likely running into this change in the REST API at 10.2:
"ArcGIS 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 makes it easier for developers and applications to query ArcGIS Server services and helps prevent SQL injection attacks. Standardized queries are enforced by default, but can be disabled by the server administrator."
If you need to use database-specific where clause statements in your application, you can disable standardized queries by accessing the ArcGIS Server Administrator Directory. To do so, follow the instructions below.
By disabling this security option, your site becomes more vulnerable to SQL injection attacks.
{"standardizedQueries": "false"}
Should have mentioned that this is running SDE against SQL Server.
Hi Michael,
You are most likely running into this change in the REST API at 10.2:
"ArcGIS 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 makes it easier for developers and applications to query ArcGIS Server services and helps prevent SQL injection attacks. Standardized queries are enforced by default, but can be disabled by the server administrator."
If you need to use database-specific where clause statements in your application, you can disable standardized queries by accessing the ArcGIS Server Administrator Directory. To do so, follow the instructions below.
By disabling this security option, your site becomes more vulnerable to SQL injection attacks.
{"standardizedQueries": "false"}
I'm trying to do something similar within a definition query and it's failing. Any ideas?