Select to view content in your preferred language

LayerQuery Limitations

3882
1
04-18-2016 11:53 AM
FredNewcomer2
Deactivated User

I am using the Android SDK to implement offline editing using per layer sync mode with ArcGIS Server 10.2.2.  Obtaining a local geodatabase with GenerateGeodatabaseParameters succeeds only when the LayerQuery is extremely simple or omitted entirely.  It seems that the WHERE clause must be in the form "field = value" and only LIKE or comparison operators are supported.  Other perfectly valid SQL expressions always cause a "Failed to create table descriptions from input. (null)" error even though they work as definition queries in ArcMap.  This error message makes no sense because the table description obviously exists in the enterprise GDB already.

Including a UDF or a subquery or even a bitwise operator in a LayerQuery would be very useful.  This would allow an enterprise geodatabase to implement business logic that a client does not (and should not) need to know.  Is there some way to overcome the serious limitations of this important feature?  Has this been fixed in any newer release?

Tags (1)
0 Kudos
1 Reply
AnthonyKobah
Regular Contributor

Disabling standardized queries

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.

CautionCaution:

By disabling this security option, your site becomes more vulnerable to SQL injection attacks.

Steps:

  1. Open the Administrator Directory and log in with a user that has administrative permissions to your site. The Administrator Directory is typically available at http://gisserver.domain.com:6080/arcgis/admin.
  2. Click system > properties > update.
  3. On the Operation - update page, enter the following string into the System Properties dialog box:

    {"standardizedQueries": "false"}

  4. Click Update.
  5. Restart ArcGIS Server.

ArcGIS REST API

0 Kudos