If your login has the proper roll you could execute
SET CHAINED OFF
just prior to executing your stored procedure. My guess is
that you don't. Altering the procedure can be a way around it but you've already
stated that you cannot change this in the production system.
You are left with only one alternative. You MUST execute
the stored procedure from within a transaction. That is what the error message
is so poorly trying to tell you. You can do one of two things. 1) Set auto
Commit to true. This will allow the stored proc to execute without this error
message. 2) start a transaction prior to executing the stored proc and commit
when complete.
From: SvetlanaR <[EMAIL PROTECTED]> [mailto:SvetlanaR <[EMAIL PROTECTED]>]
Sent: Monday, June 18, 2007 6:51 AM
To: [email protected]
Subject: Sybase stored procedure 'SET CHAINED OFF' (transaction mode) problem
Hi.
I have a problem when call my_sp stored procedure (Sybase). The problem is
listed below.
--- Check the results (failed to retrieve results).
--- Cause: com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'my_sp'
may be run only in unchained transaction mode. The 'SET CHAINED OFF' command
will cause the current session to use unchained transaction mode.
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'my_sp'
may be run only in unchained transaction mode. The 'SET CHAINED OFF' command
will cause the current session to use unchained transaction mode.
I can fix it on Sybase side by adding to the stored procedure:
EXECUTE sp_procxmode 'my_sp', 'anymode'
The problem is that I am not allowed to make this change in "Production". Is
there any way to configure iBatis, so it will not expect uchained mode?
For example, another DB client works with my_sp just fine.
Thanks.
--
View this message in context: http://www.nabble.com/Sybase-stored-procedure-%27SET-CHAINED-OFF%27-%28transaction-mode%29-problem-tf3940420.html#a11176043
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
