Access更新问题,看看有没有朋友遇上过
使用oleDB连接Access97数据库,下面两条执行:
?dbcommon.ExecuteNoQuery("update (select * from vendor where cVenCode=@cVenCode) set cvenname=@cVenName",new OleDbParameter(){new OleDbParameter(commonconst.PARA_CVENCODE,strcode),new OleDbParameter(commonconst.PARA_CVENNAME,strname)},me.objImportConnection,me.objImportTransaction)
1
?dbcommon.ExecuteNoQuery("update vendor set cvenname=@cVenName where cVenCode=@cVenCode",new OleDbParameter(){new OleDbParameter(commonconst.PARA_CVENCODE,strcode),new OleDbParameter(commonconst.PARA_CVENNAME,strname)},me.objImportConnection,me.objImportTransaction)
0
一个返回更新了一条,一个返回更新了零条,怪了说....