写了下面一段代码:
dim tb as table = tables("表1“)
For Each ro As Row In tb.Rows
Dim dr As DataRow = DataTables("表2").SQLFind("条件……'")
If dr IsNot Nothing Then
Dim s As String = dr("公式")
Dim d As Double
If Double.TryParse(s,d) Then
ro("结果") = d
Else
s = s.Replace("@", "").Replace("x", 100)
ro("结果") = Eval(s)
End If
End If
Next
tb.DataTable.Save
这段代码虽然可以实现我的要求,可是速度太慢,求用sql的方法批量更新,假设数据源为 con !