遇到个比较麻烦的问题,
代码是
If e.DataCol.Name = "派送标记" AndAlso e.DataRow ("派送标记") = "1" Then
Dim nma() As String = { "日期","项目名称","申请号","客户站点","客户申请人及电话","客户实物交接人及电话","中兴办事处确认人","设备类型*","坏件名称*" ,"派送件条码*", "客户申请时间","确认时间","到达时间","执行人","实物交接人及电话","随机编号" ,"指令类别*" } 'A表数据来源列
Dim nmb() As String = { "日期","项目名称","派送_派送申请号","客户站点","派送_派送申请人及电话","派送_派送交接人及电话","派送_派送中兴确认人及电话","设备_派送设备类型","设备_派送设备名称","设备_派送设备条码","派送_派送申请时间","派送_派送指令下达时间","派送_派送实际服务到达时间","派送_派送执行人及电话","派送_派送实物交接人及电话","随机编号" ,"指令类别" } 'B表数据接收列
Dim dr As DataRow = DataTables("系统台账").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
Next
End If
提示如下
.NET Framework 版本:2.0.50727.5466
Foxtable 版本:2012.11.28.1
错误所在事件:表,执行单,DataColChanged
详细错误信息:
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.NullReferenceException: 未将对象引用设置到对象的实例。
在 UserCode.DataColChanged(DataColEventArgs e)
--- 内部异常堆栈跟踪的结尾 ---
在 System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
在 Foxtable.DataTable.O1100l0O01l110O0l00Oll11(Object O0l0O0, DataColumnChangeEventArgs O)
麻烦帮忙看下