Dim td As String = Tables("员工工资系统_工资报表").Current("员工编号")
Dim xd As String = Tables("员工工资系统_工资报表").Current("员工姓名")
Dim sj As WinForm.TextBox = e.Form.Controls("TB工资数据")
Dim cmd As new SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "***** 工资类别,工资数据 from {员工信息} Where 员工编号 = '" & td & " 'and 员工姓名 = '" & xd & " '"
dt = cmd.ExecuteReader(True) '记得将参数设置为True
dt.ReplaceFor("工资数据", sj.text, "[员工编号] = td ")
dt.Save()
dt.Load() '重新加载,看看值是否已经变
此主题相关图片如下:sql问题3.jpg