这样改
Dim oldV = args(0)
Dim newV = args(1)
Dim r As Row = CurrentTable.Current
Dim colIndex As Integer = CurrentTable.ColSel
Dim colName As String = CurrentTable.Cols(colIndex).Name
For Each dt As DataTable In DataTables
If dt.DataCols.Contains(ColName) Then
If dt.DataCols(ColName).IsBoolean Then
For Each dr As DataRow In dt.Select("[" & colName & "] = " & oldV)
dr(colName) = newV
Next
ElseIf dt.DataCols(ColName).IsDate Then
For Each dr As DataRow In dt.Select("[" & colName & "] = #" & oldV & "#")
dr(colName) = newV
Next
ElseIf dt.DataCols(ColName).IsNumeric Then
For Each dr As DataRow In dt.Select("[" & colName & "] = " & oldV)
dr(colName) = newV
Next
ElseIf dt.DataCols(ColName).IsString Then
For Each dr As DataRow In dt.Select("[" & colName & "] = '" & oldV & "'")
dr(colName) = newV
Next
End If
End If
dt.Save
Next