Dear all,
I met a strange thing when I am trying to update value in attribute table. I am in editing session and after I perform feature.store and open the attribute table, there is no record in the attribute table. When I exit editing session, the records return, but the value not updated.
My code is as follows:
pActiveView = pMxDoc.FocusMap
pMxDoc = My.ArcMap.Application.Document
pMap = pMxDoc.FocusMap
Dim layerNum = GetIndexNumberFromLayerName(pActiveView, "proj_db.DBO.Line")
Dim pFLayer As IFeatureLayer
pFLayer = pMap.Layer(layerNum)
Dim featureClass As ESRI.ArcGIS.Geodatabase.IFeatureClass = pFLayer.FeatureClass
If featureClass is DbNull.value then
Return
End If
Dim feature as IFeature = pFLayer.FeatureClass.GetFeature(maxOBJECID)
If feature is DbNull.value then
Return
End If
Dim nameFieldIndex As Integer = pFLayer.FindField("Seg_ID")
feature.Value(nameFieldIndex) = inputSegID
feature.Store()
There no error also. Don't know what is up in my code, please help me on it, thank you very much!
I am using arcobjects 10.2.2.