我想更新数据库中的符合条件的纪录如:
用的是sql server
我这样写不行!dim cmdtext as adodb.command dim rst as adodb.recordset Dim tempstr As String, table As String cmdcookroomfood.ActiveConnection = D_cnn
cmdcookroomfood.CommandType = adCmdText
cmdcookroomfood.CommandTimeout = 15
cmdcookroomfood.CommandText = _
"update cookroomfood set printed = '0' and press = '1' where tableno = '" & table & "'and foodcode = '" & tempstr & "' and completed = '0'"
rst = cmdcookroomfood.Execute在rst = cmdcookroomfood.Execute报错!
请问如何操作可以实现?
用的是sql server
我这样写不行!dim cmdtext as adodb.command dim rst as adodb.recordset Dim tempstr As String, table As String cmdcookroomfood.ActiveConnection = D_cnn
cmdcookroomfood.CommandType = adCmdText
cmdcookroomfood.CommandTimeout = 15
cmdcookroomfood.CommandText = _
"update cookroomfood set printed = '0' and press = '1' where tableno = '" & table & "'and foodcode = '" & tempstr & "' and completed = '0'"
rst = cmdcookroomfood.Execute在rst = cmdcookroomfood.Execute报错!
请问如何操作可以实现?
set rst = cmdcookroomfood.Execute
"update cookroomfood set printed = '0',press = '1' where tableno = '" & table & "'and foodcode = '" & tempstr & "' and completed = '0'"
"update cookroomfood set printed = '0',press = '1' where tableno = '" & table & "' and foodcode = '" & tempstr & "' and completed = '0'"
set rst = cmdcookroomfood.Execute