且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

操作必须使用可更新的查询。

更新时间:2023-02-14 21:59:02

OleDbCommand.ExecuteNonQuery方法 [ ^ ]执行SQL语句并返回受影响的行数。因此,如果您使用 INSERT UPDATE DELETE sql语句,您需要使用: OleDbCommand.ExecuteReader Method [ ^ ]或 OleDbCommand.ExecuteScalar Method [ ^ ]



如果您想了解更多详情,请提供查询正文。



另一方面,请看:解决操作必须使用可更新的查询错误 [ ^ ]
OleDbCommand.ExecuteNonQuery Method [^] executes an SQL statement and returns the number of rows affected. So, if you use other than INSERT, UPDATE, DELETE sql statement, you need to use: OleDbCommand.ExecuteReader Method[^] or OleDbCommand.ExecuteScalar Method[^]

If you want more details, please provide the body of query.

On the other hand, please see this: Solving the Operation Must Use An Updateable Query error[^]