ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "But, Kelvin-KW" <Kelvin-KW....@AIG.com>
Subject RE: Calling a Sybase Store Procedure
Date Wed, 29 Dec 2004 01:22:46 GMT
Hi Siva,

I have similar experience in calling Sybase ASE 12.5 stored procedures.  My
solution is to use 

	sp_procxmode <stored procedure> , "anymode"

command to change all stored procedures into proper transaction mode.


-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Wednesday, December 29, 2004 12:10 AM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Calling a Sybase Store Procedure

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

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


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
> This is the exception I am getting,
> Caused by:
> com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'proc_next_id' may
> 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
> 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
> are confirmed by us. Message transmission is not guaranteed to be secure.

The information in this email (and any attachments) is confidential. 
If you are not the intended recipient, you must not use or disseminate the
If you have received this email in error, please immediately notify me by
"Reply" command 
and permanently delete the original and any copies or printouts thereof. 
Although this email and any attachments are believed to be free of any virus
other defect that might affect any computer system into which it is received
and opened, 
it is the responsibility of the recipient to ensure that it is virus free
and no responsibility 
is accepted by American International Group, Inc. or its subsidiaries or
affiliates either 
jointly or severally, for any loss or damage arising in any way from its

View raw message