如何使用Update语句实现数据更新?最好能有类似回滚方式保护的。
不知是否能直接采用运行Update语句的方法来实现数据更新,以下语句不能实现,也没有报错信息:
CommandText="Update table Set field1='A' Where field2='B'"
Dim myCommand as New Sqlcommand(CommandText,myconnection)
Dim myAdapter as new Sqldataadapter
Dim myDataSet as new dataset()
myAdapter.updatecommand=mycommand
myConnection.open()
myConnection.close