Error with iSpatialFilter

Discussion created by JConklin on Aug 22, 2011
Latest reply on Aug 23, 2011 by JConklin
I am attempting to run a spatial and attribute query with iSpatialFilter.  I get the following error:

Error HRESULT E_FAIL has been returned from a call to a COM component.

What does this error mean?

This is the line that throws the error
pSelSet = pFeatureClass.Select(pSF, esriSelectionType.esriSelectionTypeIDSet, esriSelectionOption.esriSelectionOptionNormal, Nothing)

The code runs if I comment out the WhereClause and run a spatial query only, so I believe there is a problem with my SQL query.

pSF.WhereClause = "Year = '1994'"

Can someone help me out with building the correct query? I am querying a shapefile.