以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  代码优化请教  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=85167)

--  作者:ljh29206
--  发布时间:2016/5/19 9:46:00
--  代码优化请教
DataTables("number").DataRows.Clear
For Each dr As Row In Tables("ployee").Rows
Dim dra As Row = Tables("number").Rows.AddNew()
For Each  c As Col In Tables("number").Cols
dra(c.name) = dr(c.name)
Next
Next


以上代码 是否有 更有效率的方式 执行

由于数据有10000多行,好费事 

--  作者:大红袍
--  发布时间:2016/5/19 12:30:00
--  
systemready = False
DataTables("number").StopRedraw
DataTables("number").DataRows.Clear
For Each dr As Row In Tables("ployee").Rows
    Dim dra As Row = Tables("number").Rows.AddNew()
    For Each  c As Col In Tables("number").Cols
        dra(c.name) = dr(c.name)
    Next
Next
DataTables("number").ResumeRedraw
systemready = True