Mapping/Linking SQL rows to Features

1557
3
03-09-2016 10:33 AM
PhilipKnight1
Occasional Contributor

We have an application that keeps tracks of physical assets, we also have some feature layers that contain features that represent many of these assets, but certainly not all. We already have a field on the feature layer that essentially just is the primary key in a SQL table. SO it's very easy for us to clock on a feature and go retirve the realted info from the SQL database.

We can also very easily send a query that returns only assets matching a list of primary keys we send to the server. That works fine for a few or even dozens of assets.

But my problem arises when I want to return a few hundred assets that match a list of primary keys. The reason being is that the ESRI queries are limited by the length of a URL (2,083 chars), which can very easily be overcome once you start looking for a few hundred assets whose primary key is 10 chars or so.

I have overcome this issue in other parts of our program by create a GUID representing a list of numbers and passing the GUID around, but I obviously don't see a way of passing a GUID to ESRI's services. Have others run into this problem?

-Phil

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Phil,

  Are you using the SQL "IN" syntax for your query? i.e. FieldA IN (1,2,3,4,5). You can also look at using a Proxy

GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP.

0 Kudos
JacobBoyle
Occasional Contributor III

You could create a spatial view on the back end in the Database and serve that out as a service, instead of doing the join on the front end?  Might give you a cleaner experience?

0 Kudos
JeffJacobson
Occasional Contributor III

Have you tried using an HTTP POST request rather than GET to work around the URL length limit?