1

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)
skaffman
  • 398,947
  • 96
  • 818
  • 769
John Mills
  • 10,020
  • 12
  • 74
  • 121
  • Any recent changes to the system? If not, googling that error code turns up at least one useful thread. – zildjohn01 Mar 04 '10 at 00:21
  • Yeah the last post on this thread (http://forums.esri.com/Thread.asp?c=93&f=1147&t=191348) pointed me in the right direction. – John Mills Mar 04 '10 at 03:37

2 Answers2

3

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
  • 515
  • 5
  • 9
1

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.

John Mills
  • 10,020
  • 12
  • 74
  • 121