Solved! Go to Solution.
feature is declared at Dim feature As IRowBuffer.
And I can't move the OpenTable out as it is dependent on shape being equal to the feature's aliasname.
tableInsertCursor = outputSignDetailTable.InsertRow(True)
shape = ArcMapAddin1.ArcGISAddin1.val '... '... '... '... Do While pFeat IsNot Nothing If shape = pFeat.Class.AliasName Then outputSignDetailTable = DirectCast(workspace, IFeatureWorkspace).OpenTable(shape) tableBuffer = outputSignDetailTable.CreateRowBuffer() row = CType(tableBuffer, IRow) '<-- is this used anywhere else? feature = tableBuffer '<--- why not just use the tableBuffer object?
tableBuffer = outputSignDetailTable.CreateRowBuffer() row = CType(tableBuffer, IRow) feature = tableBuffer
Good call on using shape in the table. Not sure why I didn't catch that. However, that's not the cause.
And I only used the following code as I saw someone else on here using it. I was trying to originally use CreateRow with some different code but it errored as well.tableBuffer = outputSignDetailTable.CreateRowBuffer() row = CType(tableBuffer, IRow) feature = tableBuffer
The error is occurring at tableInsertCursor = outputSignDetailTable.InsertRow(True).