Attachments from map services

1316
2
Jump to solution
09-07-2016 10:46 AM
MarkCederholm
Occasional Contributor III

Is there a way to query attachments from a map service (as opposed to a feature service)?  I can create and initialize a ServiceFeatureTable OK, but when I try to query attachments, I get the dreaded "Row not found" exception.  I can get to the attachments directly through REST calls, so I know it's not a data or service issue.

0 Kudos
1 Solution

Accepted Solutions
Espen_RøvikLarsen
New Contributor II

I had this problem too. I would get the same error when calling "QueryAttachmentsAsync". Solution was to call "QueryAsync" first getting the feature itself (it has something to do with internal caching in the API I guess).

View solution in original post

0 Kudos
2 Replies
Espen_RøvikLarsen
New Contributor II

I had this problem too. I would get the same error when calling "QueryAttachmentsAsync". Solution was to call "QueryAsync" first getting the feature itself (it has something to do with internal caching in the API I guess).

0 Kudos
MarkCederholm
Occasional Contributor III

That did the trick.  Normally I query features in a separate block of code, and the memory context must make a difference.  Thanks for the tip!

0 Kudos