Intermittent geodatabase exception from mapservice layer cursor

06-14-2018 06:16 AM
by Anonymous User
Not applicable

I have a bit of SDK functionality that creates a featurelayer from a mapservice uri and then queries the layer for a search string using layer.Search(queryFilter) to retrieve a rowcursor, and then loops through the rowcursor to retrieve values using while (cursor.MoveNext())

This works most of the time but I occassionally get a geodatabase exception when calling MoveNext()

ArcGIS.Core.Data.GeodatabaseException: 'A geodatabase exception has occurred.'

COMException: Bad variable type. (Exception from HRESULT: 0x80020008 (DISP_E_BADVARTYPE))

at ArcGIS.Core.Data.RowCursor.MoveNext()

Any ideas what could be causing this error? The same bit of code works perfectly for local layer files.

0 Kudos
1 Reply
Esri Regular Contributor

This isn't something we've seen before.

In theory, we know what is causing this; the error code tells us that the Variant's type isn't valid.  In practice, we don't know what could be causing this.

If you have a consistent, or sometimes consistent, reproducible case, could you please log it with support?



0 Kudos