没看懂这个代码和表格之间的关系,试试
Dim drs As List(Of DataRow)
drs = DataTables(eform.name & "_Table1").Select("工期评审=0")
Dim cmd As New SQLCommand
cmd.ConnectionName="***"
For Each dr As DataRow In drs
cmd.CommandText = "UPDATE [dbo].[SC_生产工piao明细] SET [工期] = (SELECT [工期] FROM [dbo].[GY_工艺明细] where (产品型号='" & dr("产品型号") & "' and 工艺='" & dr("工艺") & "' and 工序_编号='" & dr("工序_编号") & "' and 工序_名称='" & dr("工序_名称") & "')) where 编号='" & dr("订单编号") & "'"
cmd.ExecuteNonQuery()
rz("工期评审")=True
Next
DataTables(eform.name & "_Table1").save