ERROR
Setting the Geometry property of a spatial filter to null (or Nothing, in Visual Basic) returns the following error:
"FDO_E_SPATIALFILTER_INVALID_GEOMETRY (-2147216814)".
Prior to ArcGIS 9.3, the Geometry property of a spatial filter could be set to null. At version 9.3, additional error checking was added to prevent the property from being set to an invalid geometry with a null geometry considered as invalid.
Code:
// Create the query filter.
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.WhereClause = "PROPERTY_ID > 3000";
// Execute the query.
featureClass.Search(queryFilter, true);
Code:
// Create the spatial filter.
ISpatialFilter spatialFilter = new SpatialFilterClass();
spatialFilter.WhereClause = "PROPERTY_ID > 3000";
// Execute the query.
featureClass.Search(spatialFilter, true);
Article ID: 000010046
Get help from ArcGIS experts
Download the Esri Support App