以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 内部数据表更新到外部数据库中 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=142573) |
-- 作者:Hareen时代 -- 发布时间:2019/10/31 10:20:00 -- 内部数据表更新到外部数据库中 内部数据表有6000至两万条数据,在不加载外部表的情况下,有没有很快速的方法,将内部表的 数据追加到外部表中!求老师给个示例
|
-- 作者:有点蓝 -- 发布时间:2019/10/31 10:37:00 -- 例如 Dim cmd As new SQLCommand Dim dt As DataTable cmd.CommandText = "select * From {表B}" dt = cmd.ExecuteReader(True) \'记得将参数设置为True Dim Cols1() As String = {"来源列一","来源列二","来源列三"} Dim Cols2() As String = {"接收列一","接收列二","接收列三"} For Each dr1 As DataRow In DataTables("表A").Select("[金额] > 100") Dim dr2 As DataRow = dt.AddNew() For i As Integer = 0 To Cols1.Length -1 dr2(Cols2(i)) = dr1(Cols1(i)) Next Next dt.Save
|