When there are multiple update statements or delete statements in a stored procedure with a select statement at the end. If we execute this type of procedure, being a select statement at the end we expect a result set. Instead it will throw an SQLException : The statement did not return a result set.
This is because the update statements in the proecedure and it will return the number of rows updated, so it throws that exception.
Solution : In your procedure use SET NOCOUNT ON, it will remove the messages when rows were updated and you will get result set.
Thanks!
That solved my problem!
I think I love you.
This hint solved hours of frustration for me.
thank you!
Thanks for taking the time to post this. Solved my problem as well.
You is man !!!!
thank you da thak you veery much……..