ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Toole, Joe" <Joe.OTo...@fmr.com>
Subject Sybase stored proc
Date Wed, 30 May 2007 10:13:25 GMT
Hi

I am calling a sybase stored proc and am getting the following error:

Stored procedure may be run only in unchained transaction mode. The 'SET
CHAINED OFF' command will cause the current session to use unchained
transaction mode.

I have seen the issue documented while going through the archived mails. 

The following solution was documented in Dec 04. I am wondering if a fix has
been put in for this in the meantime

Thanks

Joe

Dec 04 Solution 
You have to run certain SYBASE stored procedures with AutoCommit=ON. 
However, iBATIS does not support autocommit (by design).  So, at this
time you'll need to supply your own connection (set autocommit=true)
to .setUserConnection().

You can use the same datasource to get a new connection from the
SqlMapClient (.getDataSource()), then set autocommit to true, then
.setUserConnection().  Just be sure to manage it and close it
properly.

Sorry for the roundabout solution, I'm looking for a better one.  Too
bad Sybase does this to us.



Mime
View raw message