Get Features from ifeatureclass

المشرف العام

Administrator
طاقم الإدارة
I am facing the issue while I am trying to get all the features back in 'Attribute Table'. What I am doing is.


  1. Selected the layer from Map
  2. Performs my Edits on few features (changing filed values)
(After I perform my changes I take


  1. While I again want to get all my features back I am getting error.
Exception from HRESULT: 0x8004151C

I tried with below code :

In both the case it's giving error.

///////1st////////// IFeatureClass pFc = ilayer.FeatureClass; IFeatureCursor pFCursor; IFeature pF; queryFilterlast.WhereClause = "SHAPE.LEN IS NOT NULL"; pFCursor = pFc.Search(queryFilterlast, false); pF = pFCursor.NextFeature(); while (pF != null) { pF = pFCursor.NextFeature(); } /////////2nd////////////// //initialize queryfilter queryFilterlast.SubFields = "*"; queryFilterlast.WhereClause = "SHAPE.LEN IS NOT NULL"; //Using a query filter to search a feature class: featureselectionlast.SelectFeatures(queryFilterlast, esriSelectionResultEnum.esriSelectionResultNew, false); //output features assign into featureset featuresetlast = featureselectionlast.SelectionSet; if (featuresetlast.Count != 0) { featuresetlast.Search(null, false, out icursor); //featureCursor = icursor as IFeatureCursor; IFeatureCursor featureCursorL = icursor as IFeatureCursor; //Get the output features IFeature feature = featureCursorL.NextFeature(); //Loop through output features while (feature != null) { feature = featureCursorL.NextFeature(); } //Release the cursor System.Runtime.InteropServices.Marshal.ReleaseComObject(featureCursorL); featureCursorL = null; }

أكثر...
 
أعلى