打印本文 打印本文 关闭窗口 关闭窗口
sybase jdbc driver 的小毛病
作者:武汉SEO闵涛  文章来源:敏韬网  点击数870  更新时间:2009/4/22 23:09:11  文章录入:mintao  责任编辑:mintao
使用sybase jdbc driver得到connection conn,多次使用conn.setAutoCommit(b),b 为相同的true|false时,报错SET CHAINED command not allowed within multi-statement transaction.
解决方法:
使用
if (conn.getAutoCommit()!=b) {
    conn.setAutoCommit(b);
}
代替
conn.setAutoCommit(b).

使用其它数据库(如oracle)没有这个问题.

打印本文 打印本文 关闭窗口 关闭窗口