Foxtable(狐表)用户栏目专家坐堂 → 不重复行下自动拷贝问题


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

主题:不重复行下自动拷贝问题

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2013/8/30 23:04:00 [显示全部帖子]

 如下代码

Select Case e.DataCol.name
    Case "单号"
        'Dim cmd As New SQLCommand
        'Dim dt As DataTable
        'cmd.C
        'cmd.CommandText = "Select * From {A} Where [单号] = '" &  e.NewValue & "'"
        If e.DataTable.Find("单号= '" & e.NewValue & "' and _Identify <> " & e.DataRow("_Identify")) Is Nothing Then
            Dim nma() As String = {"单号"} 'A表数据来源列
            Dim nmb() As String = {"指令号"} 'B表数据接收列
            Dim dr As DataRow = DataTables("B").AddNew
            For i As Integer = 0 To nma.Length - 1
                dr(nmb(i)) = e.DataRow(nma(i))
            Next
            MainTable =Tables("B")
            
        End If
End Select

 回到顶部