This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Executing a stored procedure returns false Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Executing a stored procedure returns false" Watch "Executing a stored procedure returns false" New topic
Author

Executing a stored procedure returns false

Srikkanth Mohanasundaram
Ranch Hand

Joined: Feb 07, 2007
Posts: 185
Hello all,

I'm using the following code to call a stored procedure and use the multiple result sets returned by the procedure.



The console prints false and i am unable to get the results.
The procedure as mentioned returns mutiple resultsets and I'm using Microsoft SQL server 2005. I did a call to this procedure from SQL editor and it works fine. Can someone let me know on what i am doing wrong here?

Thanks,
Srikkanth
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Srikkanth,
Does the stored procedure do any insert/update/deletes? If so, the stored procedure may be returning the # rows changed rather than the resultsets.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Srikkanth Mohanasundaram
Ranch Hand

Joined: Feb 07, 2007
Posts: 185
Yes you are right. It does some delete of temporary tables. So how would i get the resultsets , is it not possible?

Thanks for your help,
Srikkanth
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Srikkanth Mohanasundaram wrote:Yes you are right. It does some delete of temporary tables. So how would i get the resultsets , is it not possible?

I would think it is possible. How to do so varies by database though. Conceptually, the stored procedure accumulates the result sets and returns them.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Executing a stored procedure returns false
 
Similar Threads
Hibernate 3 : Storing return value from Stored procedure call
CallableStatement resultset returns only columns and no data, where data exists.
Returning A List Of Variables From A Folder Of Documents And Returning Them Into A New Document
Can not Populate the form on combo box change
Weired error comes while using stored procedure with hibernate