java - ibatis 、oracle 执行sql update没成功,也没抛异常
ringa_lee
ringa_lee 2017-04-17 13:58:54
0
4
908

执行update的sql是使用的in(...)这样的形式。
由于oracle支持的in的参数有限,所以就分批来执行程序,基本形式如下:

for(i=0; i<n; i++){
int ret = sqlmapclient.update("sqlid", params[i]);
}

params就是就是in的参数。
现在就是程序ret返回0,表未真正更新写入数据,且程序未抛异常,数据库那边也未检测到异常错误,帮忙分析下可能会有什么原因出现这种情况?

ringa_lee
ringa_lee

ringa_lee

reply all(4)
巴扎黑

The update was not executed successfully, probably because there is no data that meets the conditions to be updated, so the number of items returned is 0

黄舟

Do you want to set up automatic submission?

洪涛

The transaction is not submitted, check the transaction-related code or configuration

黄舟

It is suspected that the transaction has not been committed. Check the transaction configuration.
It may also be that the code behind throws an exception, causing the entire transaction to be rolled back.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!