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