问题:
入库明细表和出库明细表分别用主键和库存表建立了关联,并勾选了同步删除行
为什么在删除入库单的时候,库存表把和出库相关数据一起删除了?
尝试取消同步删除行,并在入库明细表删除行事件输入下面的代码:
Dim dr As DataRow = DataTables("库存").Find("关联列 = '" & e.DataRow("_Identify ") & "'")
If dr IsNot Nothing Then
dr.Delete()
End If
删除行时出现错误提示?
Exception has been thrown by the target of an invocation.
Column '_Identify ' does not belong to table 入库明细.
为什么说主键不属于入库明细?