Foxtable(狐表)用户栏目专家坐堂 → [求助]filler的机制问题


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

主题:[求助]filler的机制问题

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


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

DataTables("D").DataRows.Clear
Tables("D").AddNew(10000)
For Each r As Row In Tables("D").Rows
    r("C") = rand.NextString(12)
    r("T") = rand.NextString(12)
    r("U") = rand.NextString(12)
    r("A") = rand.Next(500)
    r("P") = rand.Next(1500)
Next


Dim st As Date = Date.Now
Dim log As String
Dim f As New Filler
f.SourceTable = DataTables("D") '指定数据来源
f.SourceCols = "C,T,U,A,P" '指定数据来源列
f.DataTable = DataTables("E") '指定数据接收表
f.DataCols = "C,T,U,A,P" '指定数据接收列
f.Fill()
log &=  "FILL耗时: " & (Date.Now - st).TotalSeconds & "秒" & vbcrlf


DataTables("E").DataRows.Clear
Dim st2 As Date = Date.Now
systemready = False
DataTables("e").StopRedraw
Dim rowArray() As system.data.DataRow = DataTables("d").BaseTable.Select("")
Dim btable As system.data.DataTable =  DataTables("E").basetable
For Each r As system.data.DataRow In rowarray
    Dim dr As system.data.DataRow = btable.newrow
    dr("C") = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(r("C"))
    dr("t") = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(r("t"))
    dr("u") = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(r("u"))
    dr("a") = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(r("a"))
    dr("p") = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(r("p"))
    btable.rows.add(dr)
Next
log &=  "赋值耗时: " & (Date.Now - st2).TotalSeconds & "秒" & vbcrlf
output.Show(log)
DataTables("e").ResumeRedraw
systemready = True


 回到顶部