ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Calling a Sybase Store Procedure
Date Tue, 28 Dec 2004 16:09:44 GMT
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.

Cheers,
Clinton


On Tue, 28 Dec 2004 16:00:25 -0000, Jagadeesan, Siva
<siva.jagadeesan@csfb.com> wrote:
> Hi Guys:
> 
> I am having problem when I am trying to call a store procedure through IBatis.
> 
> This is the exception I am getting,
> 
> Caused by:
> com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'proc_next_id' may be
> run only in unchained transaction mode. The 'SET CHAINED OFF' command will
> cause the current session to use unchained transaction mode.
> 
> I am able to call this store proc using direct JDBC.
> 
> I think it is something to do with Connection.
> 
> Has anyone came across this problem
> 
> Rgds,
> --Siva Jagadeesan
> 
> ==============================================================================
> This message is for the sole use of the intended recipient. If you received
> this message in error please delete it and notify us. If this message was
> misdirected, CSFB does not waive any confidentiality or privilege. CSFB
> retains and monitors electronic communications sent through its network.
> Instructions transmitted over this system are not binding on CSFB until they
> are confirmed by us. Message transmission is not guaranteed to be secure.
> ==============================================================================
> 
>

Mime
View raw message