views:

96

answers:

2

I'm supporting an application built on ESRI ArcObjects where the original developers are long since gone. The application after having worked fine for a couple of years has started failing with this exception. The application runs on a daily schedule.

The error message isn't very helpful. Any ideas what the cause of the error might be?

Exception from HRESULT: 0x80040653
Date: Thursday, 4 March 2010
Time: 1:47:33 a.m.
Stack trace:    
   at ESRI.ArcGIS.Geodatabase.IFeatureClass.Search(IQueryFilter filter, Boolean Recycling)
+1  A: 

It turns out the error was caused by the IQueryFilter.WhereClause property that was getting passed into the Search method, contained the name of a field that didn't exist in the feature class.

It would be nice if the exception thrown had a relevant message. It would've saved me a lot of time.

GiddyUpHorsey
A: 

Here is a link to an article on ESRI error codes that can be used to look up an error.

The particualar error you recieved is defined as FDO_E_FIELD_NOT_FOUND, which you already figured out indicates the attempted use of a field name that is not in the table.

Malcolm Post