These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Stored procedure [name] may be run only in unchained trans..
PostPosted: Wed May 12, 2004 10:37 am 
Regular
Regular

Joined: Tue May 04, 2004 6:15 am
Posts: 51
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

_________________
eu:life
http://www.eulife.gr


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 6:17 am 
Regular
Regular

Joined: Tue May 04, 2004 6:15 am
Posts: 51
Any help? :(

_________________
eu:life
http://www.eulife.gr


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 7:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Did you read http://forum.hibernate.org/viewtopic.php?t=927151&highlight=set+chained ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 8:21 am 
Regular
Regular

Joined: Tue May 04, 2004 6:15 am
Posts: 51
Thanks...missed that :|

_________________
eu:life
http://www.eulife.gr


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.