以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 运行错误提示  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=55316)

--  作者:man9997
--  发布时间:2014/8/14 12:00:00
--  [求助] 运行错误提示
.NET Framework 版本:2.0.50727.5477
Foxtable 版本:2014.8.4.1
错误所在事件:表,Information,DataColChanged
详细错误信息:
调用的目标发生了异常。
未将对象引用设置到对象的实例。


这个是什么回事呢

--  作者:man9997
--  发布时间:2014/8/14 12:01:00
--  
这是我表属性 DataColChanged 里面的代码 是代码的问题吗
\'自动增加到另外表格的序号
Select Case e.DataCol.Name 
    Case "序号"
        If e.DataRow.IsNull("序号") = False Then \'如果已经输入订单编号
            If e.DataRow.GetChildRows("PersonalInformation").Count = 0 Then \'而且无订单明细
                Dim dr As DataRow = DataTables("PersonalInformation").AddNew()
                dr("序号") = e.DataRow("序号")
            End If
        End If
End Select






\'窗口自动输入
Select Case e.DataCol.Name
    Case "Information_Name"
        Dim fdr As DataRow = DataTables("序号").Find("Informati")
        If fdr Is Nothing Then
            fdr = e.DataTable.Find("Informati")
        End If
        If fdr IsNot Nothing Then
            e.DataRow("Information_Address") = fdr("Information_Address")
            e.DataRow("Information_postcode") = fdr("Information_postcode")
            e.DataRow("Information_Phone") = fdr("Information_Phone")
        End If

[此贴子已经被作者于2014-8-14 12:01:41编辑过]

--  作者:Bin
--  发布时间:2014/8/14 12:02:00
--  
Select Case e.DataCol.Name 
    Case "序号"
        If e.DataRow.IsNull("序号") = False Then \'如果已经输入订单编号
            If e.DataRow.GetChildRows("PersonalInformation").Count = 0 Then \'而且无订单明细
                Dim dr As DataRow = DataTables("PersonalInformation").AddNew()
                if dr isnot nothing then
                dr("序号") = e.DataRow("序号")
                end if
            End If
        End If
End Select

--  作者:man9997
--  发布时间:2014/8/14 12:19:00
--  
老师还是提示错误啊


.NET Framework 版本:2.0.50727.5477
Foxtable 版本:2014.8.4.1
错误所在事件:表,Information,DataColChanged
详细错误信息:
调用的目标发生了异常。
未将对象引用设置到对象的实例。


--  作者:man9997
--  发布时间:2014/8/14 13:05:00
--  老师解决了谢谢
老师解决了谢谢