Version 2.1.3
DB: Sybase 11.9.2.3
Code:
Session session = sessionFactory.openSession();
connection = session.connection();
statement = connection.prepareStatement(query);
When trying to execute a SP using the above statements I get the following error:
Stored procedure [name] may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.
When adding the statement
connection.setAutoCommit(true);
I get a
SET CHAINED command not allowed within multi-statement transaction. error but making the call for the 2nd time, it works correctly (although I doubt its the right way!)
I also trying adding the "SET CHAINED OFF" statement in the beginning of the procedure, but didn't change much :/
Any help much appreciated