Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
Case "类别", "名称" ,
"比率系数", "备注"
Dim bms() As String = {"全隐框玻璃幕墙单价分析表",
"全明框玻璃幕墙单价分析表"}'最后整体拷贝修改
For Each bm As String In bms
'Dim drs As List(Of DataRow) = DataTables(bm).Select( "[项目构成] = '" & e.DataRow("名称") & "' and [辅助列1] =
'" & e.DataRow("类别") &
"'") '用这条语句编译都成功了,但是后面的语句没起作用
Dim drs As List(Of DataRow) =
DataTables(bm).DataRows '用这条语句报错,编译都过不去
For Each dr As DataRow In drs
Dim cmd As New SQLCommand
'cmd.Cmso-bookmark:OLE_LINK1">数据源名称"
cmd.CommandText = "UPDAT E bm SET 比率系数= ? 备注= ?
WHERE 项目构成 = ? 辅助列1 = ?"
cmd.Parameters.Add("@比率系数", dr("比率系数"))
cmd.Parameters.Add("@备注", dr("备注"))
cmd.Parameters.Add("@项目构成", dr("名称"))
cmd.Parameters.Add("@辅助列1", dr("类别"))
cmd.ExecuteNonQuery
Next
Next
End Select
老师好,还是不能解决卸载表的跨表更新问题,老师您给你看看代码如何修改一下,以便实现所需要的功能目的 谢谢老师
Case "类别", "名称" , "比率系数", "备注"
Dim bms() As String = {"全隐框玻璃幕墙单价分析表", "全明框玻璃幕墙单价分析表"}'最后整体拷贝修改
Dim cmd As New SQLCommand
For Each bm As String In bms
cmd.CommandText = "UPDATE {" & bm & "} SET " & e.DataCol.Name & "= ? WHERE 项目构成 = ? 辅助列1 = ?"
cmd.Parameters.clear
cmd.Parameters.Add("@p1", e.newvalue)
cmd.Parameters.Add("@项目构成", e.datarow("名称"))
cmd.Parameters.Add("@辅助列1", e.datarow("类别"))
cmd.ExecuteNonQuery
Next
End Select