my dog learned polymorphism*
The moose likes JDBC and the fly likes Select Statement Stored Procedures in MS sql server not returning anything... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Select Statement Stored Procedures in MS sql server not returning anything..." Watch "Select Statement Stored Procedures in MS sql server not returning anything..." New topic
Author

Select Statement Stored Procedures in MS sql server not returning anything...

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
ok,

here is my 'driver class' :



the SqlComand.Fill() method:



and finally, here is the stored procedure....



ok the problem is, when i take the 'where itemnumber = @Itemnumber' out of the
sproc, the resultset gets filled fine and I see it print, but if i uncomment/put the
'where itemnumber = @itemnumber' then the resultset doesn't get filled for some
reason...

Am I missing something?

Thanks,

Justin Fox>


You down with OOP? Yeah you know me!
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

Are you able to call stored procedure directly without using the application ?


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
I don't really understand what you mean. I can call the stored procedure from the MS Sql management studio in a query,
but I need to call it from the app.

And like I said before, if i take out the 'where itemnumber = @itemnumber' then the resultset gets filled if I leave it in there
it doesn't get filled.

its weird too because the parameter is always there, but when i use it, it doesn't work.

thanks,

Justin
 
 
subject: Select Statement Stored Procedures in MS sql server not returning anything...
 
Similar Threads
SQL Procedures
Call to Stored Proc Returns 1st Row of RS into callableStmt
Error Type Mismatch
Error in getting data from database
calling stored procedure from java