Foxtable(狐表)用户栏目专家坐堂 → [求助]关于_Identify列


  共有3309人关注过本帖树形打印复制链接

主题:[求助]关于_Identify列

帅哥哟,离线,有人找我吗?
hovi
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:208 积分:1416 威望:0 精华:0 注册:2013/6/1 23:24:00
[求助]关于_Identify列  发帖心情 Post By:2014/4/8 21:28:00 [只看该作者]

我使用的是外部数据源,但是在一开始建立数据库时并没有建立_Identify列,在FT中操作建立外部数据源后编辑项目,发现需要使用_Identify列,然后在数据库程序中建立了_Identify列,这时,在FT中不能看到_Identify列,请问这时我该如何操作?

在项目运行时出现图片错误,请问是由于_Identify列引起的么?

代码如下:

If  e.DataCol.Name = "申报单号" Then
    Dim nms() As String = { "货主","货主电话","品种","数量","单位","用途","启运地_省","启运地_市","启运地_区","启运地_街","启运地_村","启运地_号","启运地_户","到达地_省","到达地_市","到达地_区","到达地_街","到达地_村","到达地_号","启运时间" }
    If  e.NewValue Is Nothing Then
        For Each nm As String In nms
            e.DataRow(nm) = Nothing
        Next
    Else
        Dim dr As DataRow
        dr = DataTables("动物申报").Find("[申报单号] = '" & e.NewValue & "'")
        If  dr IsNot Nothing
            For Each nm As String In nms
                e.DataRow(nm) = dr(nm)
            Next
        End If
    End If
End If

If e.DataRow.IsNull("货主")=False AndAlso e.DataRow.IsNull("货主电话")=False AndAlso e.DataRow.IsNull("承运人")=False AndAlso e.DataRow.IsNull("承运人电话")=False AndAlso e.DataRow.IsNull("运载牌照号")=False Then
    Dim dr As DataRow = DataTables("货主信息").Find( "货主='" & e.DataRow("货主") & "' And 货主电话='" & e.DataRow("货主电话") & "' And 承运人='" & e.DataRow("承运人") & "' And 承运人电话='" & e.DataRow("承运人电话") & "' and 运载牌照号='" & e.DataRow("运载牌照号") & "'")
    If dr Is Nothing Then
        Dim dr2 As DataRow =  DataTables("货主信息").addnew
        dr2("货主")=e.DataRow("货主")
        dr2("货主电话")= e.DataRow("货主电话")
        dr2("承运人")=e.DataRow("承运人")
        dr2("承运人电话")=e.DataRow("承运人电话")
        dr2("运输牌照号")=e.DataRow("运载牌照号")
    End If
End If

 


If e.DataCol.Name = "数量" OrElse e.DataCol.Name = "单位" Then
    e.DataRow("数量单位") = CUNumber(e.DataRow("数量")) & e.DataRow("单位")
End If

If e.DataCol.Name = "启运时间" Then
    Dim s As String = Format(e.DataRow("启运时间"), "yyyy-MM-dd")  
    e.DataRow("启运时间_年") = CLDate(e.DataRow("启运时间")).SubString(0,4)
    Dim md As String = CLDate(e.DataRow("启运时间")).SubString(5).trimend("日") 
    Dim Parts() As String = md.Split("月") 
    e.DataRow("启运时间_月") = Parts(0)   
    e.DataRow("启运时间_日") = Parts(1)   
End If


If e.DataCol.name="申报单号" AndAlso e. DataRow.isnull("申报单号")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("申报单号")=e.DataRow("申报单号")
    End If
    dr("申报单号")=e.DataRow("申报单号")
End If
If e.DataCol.name="检疫证号" AndAlso e. DataRow.isnull("检疫证号")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("检疫证号")=e.DataRow("检疫证号")
    End If
    dr("检疫证号")=e.DataRow("检疫证号")
End If
If e.DataCol.name="货主" AndAlso e. DataRow.isnull("货主")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("货主")=e.DataRow("货主")
    End If
    dr("货主")=e.DataRow("货主")
End If
If e.DataCol.name="品种" AndAlso e. DataRow.isnull("品种")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("品种")=e.DataRow("品种")
    End If
    dr("品种")=e.DataRow("品种")
End If
If e.DataCol.name="数量" AndAlso e. DataRow.isnull("数量")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("数量")=e.DataRow("数量")
    End If
    dr("数量")=e.DataRow("数量")
End If
If e.DataCol.name="启运地" AndAlso e. DataRow.isnull("启运地_村")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("启运地")=e.DataRow("启运地_村")
    End If
    dr("启运地")=e.DataRow("启运地_村")
End If
If e.DataCol.name="到达地" AndAlso e. DataRow.isnull("到达地_村")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("到达地")=e.DataRow("到达地_村")
    End If
    dr("到达地")=e.DataRow("到达地_村")
End If
If e.DataCol.name="用途" AndAlso e. DataRow.isnull("用途")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("用途")=e.DataRow("用途")
    End If
    dr("用途")=e.DataRow("用途")
End If
If e.DataCol.name="日期" AndAlso e. DataRow.isnull("启运时间")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("日期")=e.DataRow("启运时间")
    End If
    dr("日期")=e.DataRow("启运时间")
End If
If e.DataCol.name="检疫员" AndAlso e. DataRow.isnull("检疫员")=False Then
    Dim dr As DataRow = DataTables("检疫记录").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("检疫记录").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("检疫员")=e.DataRow("检疫员")
    End If
    dr("检疫员")=e.DataRow("检疫员")
End If

'写到养殖户补出栏信息表
If e.DataCol.name="编号" AndAlso e. DataRow.isnull("编号")=False Then
    Dim dr As DataRow = DataTables("养殖户补出栏信息").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("养殖户补出栏信息").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("编号")=e.DataRow("编号")
    End If
    dr("编号")=e.DataRow("编号")
End If
If e.DataCol.name="品种" AndAlso e. DataRow.isnull("品种")=False Then
    Dim dr As DataRow = DataTables("养殖户补出栏信息").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("养殖户补出栏信息").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("品种")=e.DataRow("品种")
    End If
    dr("品种")=e.DataRow("品种")
End If
If e.DataCol.name="出栏_检疫" AndAlso e. DataRow.isnull("数量")=False Then
    Dim dr As DataRow = DataTables("养殖户补出栏信息").Find("ID = " & e.DataRow("_Identify"))
    If dr  Is Nothing Then
        dr = DataTables("养殖户补出栏信息").addnew
        dr("ID") = e.DataRow("_Identify")
        dr("出栏_检疫")=e.DataRow("数量")
    End If
    dr("出栏_检疫")=e.DataRow("数量")
End If


图片点击可在新窗口打开查看此主题相关图片如下:错误3.png
图片点击可在新窗口打开查看

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/4/8 21:39:00 [只看该作者]

 你先定位一下错误。

 

http://www.foxtable.com/help/topics/1485.htm

 


 回到顶部
帅哥哟,离线,有人找我吗?
hovi
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:208 积分:1416 威望:0 精华:0 注册:2013/6/1 23:24:00
  发帖心情 Post By:2014/4/8 21:40:00 [只看该作者]

好的,我弄一下,谢谢


 回到顶部