ibatis执行sybase存储过程报错Stored procedure 'proc_acctquery' may be run only in unchained transaction mode

ibatis执行sybase存储过程时报错 Stored procedure 'proc_acctquery' may be run only in unchained transaction mode


Caused by: com.sybase.jdbc3.jdbc.SybSQLException: Stored procedure 'proc_acctquery' may be run only in unchained transaction mode. 
       The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.

	at com.sybase.jdbc3.tds.Tds.processEed(Tds.java:2988)
	at com.sybase.jdbc3.tds.Tds.nextResult(Tds.java:2292)
	at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
	at com.sybase.jdbc3.jdbc.SybStatement.nextResult(SybStatement.java:220)
	at com.sybase.jdbc3.jdbc.SybStatement.nextResult(SybStatement.java:203)
	at com.sybase.jdbc3.jdbc.SybStatement.executeLoop(SybStatement.java:1868)
	at com.sybase.jdbc3.jdbc.SybCallableStatement.execute(SybCallableStatement.java:157)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
	at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
	at sun.proxy.$Proxy2.execute(Unknown Source)
	at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:278)
	at com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:39)
	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)

解决方法 :在sybase数据库中执行  exec 'sp_procxmode  proc_acctquery' ,  'anymode'

proc_acctquery --自己编写的存储过程名

'anymode'--模式

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值