Attachments to Tables Not Supported

4480
2
10-13-2014 02:57 PM
MarkCederholm
Occasional Contributor III

Table support has definitely improved with the release, but support for attachments to tables (i.e. no geometry) isn't quite there yet.  A ServiceFeatureTable indicates that it has attachments, but QueryAttachmentsAsync causes the following exception:

A first chance exception of type 'System.Exception' occurred in mscorlib.dll

Not found : Row not found.

   at RuntimeCoreNet.Interop.HandleException(Boolean retVal)

   at RuntimeCoreNet.CoreFeatureSource.ImportAttachmentInfos(String jsonFilePath, Int64 featureID)

   at Esri.ArcGISRuntime.Data.ServiceFeatureTable.<ImportAttachmentInfosAsync>d__42.MoveNext()

An offline geodatabase indicates that the table has no attachments, and the attachment tables are not present in the geodatabase (although they are for a feature class), so that looks like an ArcGIS Server 10.2.2 issue.

0 Kudos
2 Replies
MarkCederholm
Occasional Contributor III

With Runtime 10.2.5 and Server 10.3, there's a partial fix.  I can successfully use sync to create a geodatabase with table attachments, and Runtime queries them fine.  I can also add an attachment and sync it back.

However, I still get the "Row not found" exception when I query a ServiceFeatureTable directly with Runtime.

0 Kudos
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).