Using GenerateGeodatabaseParameters's layerQueries property in qml

6659
17
Jump to solution
03-25-2016 09:00 AM
tanerkoka1
Occasional Contributor

Hi,

I want to filter data from specific service layer when generating a local geodatabase, when I use long query generating a local geodatabase gives an error.I also query the same query in rest api in web, when I make query with Query (GET) buton also show nothing in rest but when I make query with Query (POST)  give correct result.How can I filer correct with layerQueries  and generating a local geodatabase without error.

Thanks.

Tags (2)
0 Kudos
17 Replies
tanerkoka1
Occasional Contributor

I added ArcGISRuntime.doPost = true; code in Component.onCompleted  but again same exception gives .How can I solve with differenet way ?

Thanks

0 Kudos
LucasDanzinger
Esri Frequent Contributor

What does the json response look like in fiddler? Do you get more details other than "failed"?

0 Kudos
tanerkoka1
Occasional Contributor

Here is my response below in picture:

response.png

0 Kudos
LucasDanzinger
Esri Frequent Contributor

This looks like just the request, not the response. In Fiddler, if you are in the Default view, you should see a box on the bottom right of the screen, with a bunch of tabs. Click on the JSON one.

0 Kudos
tanerkoka1
Occasional Contributor

I can't see nothing request or something else in Fiddler ,so I can't see nothing in box or bottom right of the screen.Are there any idea how to se the request in Fiddler or to solve this problem with different way.

Thanks

0 Kudos
FredNewcomer2
New Contributor

I followed this discussion while trying to resolve my own dilemma.  Using the "Create Replica" feature of a service's REST page was very helpful -- but misleading.  For others attempting to troubleshoot similar problems, beware that the input json is never validated.  I initially failed to close my LayerQueries expression with a final curly brace but ArcServer produced a replica without complaint.  The faulty expression was ignored entirely which I only discovered after downloading and examining the replica with a SQLite utility.

From what I can tell, taner koka's expression fails because "IN" a list or subquery does not seem to be supported.  A compound OR condition might work although I haven't needed to try.  Unfortunately, many valid and useful WHERE clause expressions produce inexplicable errors.  This is a serious problem which really needs to be resolved.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Fred,

Thanks for your investigation. Can you please file a support request so that they can continue troubleshooting and log a bug?

Thanks,

Luke

0 Kudos
AnthonyKobah
Occasional Contributor

taner koka

You might have to set Standardized Queries to False if its failing to generate the database as a result of the WHERE clause.

By default, standardized Queries are set to true. Be mindful doing so will make your database more vulnerable to SQL injections. Please see the link below.

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

0 Kudos