-->
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.  [ 1 post ] 
Author Message
 Post subject: doWork() and doReturningWork() in Sybase dialect
PostPosted: Thu Apr 25, 2013 12:54 am 
Newbie

Joined: Tue Oct 25, 2011 5:54 pm
Posts: 3
Hi All,
I tried using both the doWork() and doReturningWork() methods but for some reasons I have issues when executing the stored procedure in Sybase.

The SP's are by default in "unchained" mode in our environments , so when executing this gives me an error saying 'SP should run only in chained mode .........,'.

Code:
                      session.doWork(new Work() {
             public void execute(Connection connection) throws SQLException {
                //connection.setAutoCommit(true);
                //sess.createSQLQuery("set chained off").executeUpdate();
             }
         });

To fix this i tried to even "set chained off" within the above methods using the connection object but then again it fails with the below error.
SET CHAINED command not allowed within multi-statement transaction.

Sybase version is 15.5 and hibernate version is 4.1.9
jconn3.jar is used.

Any help is appreciated on this.


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

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.