Foxtable(狐表)用户栏目专家坐堂 → 关联表克隆


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

主题:关联表克隆

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


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

Dim t1 As Table
Dim t2 As Table
Dim t3 As Table
For Each r1 As DataRow In t1.DataTable.Select("bh = '" & t1.current("bh") & "'")
    Dim nr1 As Row = t1.addnew
    For Each c As Col In t1.cols
        nr1(c) = r1(c.name)
    Next
    For Each r2 As DataRow In t2.DataTable.Select("bh = '" & r1("bh") & "'")
        Dim nr2 As Row = t2.addnew
        For Each c As Col In t1.cols
            nr2(c) = r2(c.name)
        Next
        For Each r3 As DataRow In t3.DataTable.Select("bh = '" & r2("bh") & "'")
            Dim nr3 As Row = t3.addnew
            For Each c As Col In t3.cols
                nr3(c) = r3(c.name)
            Next
        Next
    Next
Next


 回到顶部