-->
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.  [ 2 posts ] 
Author Message
 Post subject: Insert, Update/Delete and Select - executeUpdate or list
PostPosted: Thu May 10, 2012 4:53 am 
Newbie

Joined: Mon Apr 24, 2006 9:14 am
Posts: 5
Hi,

I've written a stored procedure with the following sql statements

a) insert a row in table a
b) update a row in table b
c) insert a row in error table
d) select query to list the number of records in the error table

All the above statements are in a single stored procedure.

Can i use query.list() ? Will it does all the inserts, updates and returns the list properly?

I think we cannot use query.executeUpdate() as it returns only number of rows updated or inserted at last sql statement.

Thanks in advance,
Kathir


Top
 Profile  
 
 Post subject: Re: Insert, Update/Delete and Select - executeUpdate or list
PostPosted: Mon May 14, 2012 2:51 am 
Newbie

Joined: Mon Apr 24, 2006 9:14 am
Posts: 5
Can anyone please let me know the comments on this?

Thanks in advance,
Kathir


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.