1、
For Each dr As DataRow In DataTables("表A").DataRows
DataTables("表B").SQLReplaceFor("列1", dr("列1"), Filter0)
DataTables("表B").SQLReplaceFor("列2", dr("列2"), Filter0)
DataTables("表B").SQLReplaceFor("列3", dr("列3"), Filter0)
DataTables("表B").SQLReplaceFor("列4", dr("列4"), Filter0)
DataTables("表B").SQLReplaceFor("列5", dr("列5"), Filter0)
......
Next
----------
2、
' 定义异步函数
Async Function UpdateTrendDataAsync() As Task
For Each dr As DataRow In DataTables("表A").DataRows
Dim updateTask As Task = Task.Run(Sub()
DataTables("表B").SQLReplaceFor("列1", dr("列1"), Filter0)
DataTables("表B").SQLReplaceFor("列2", dr("列2"), Filter0)
DataTables("表B").SQLReplaceFor("列3", dr("列3"), Filter0)
DataTables("表B").SQLReplaceFor("列4", dr("列4"), Filter0)
DataTables("表B").SQLReplaceFor("列5", dr("列5"), Filter0)
End Sub)
Await updateTask
Next
End Function
' 调用异步函数
Dim updateTask As Task = UpdateTrendDataAsync()