Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a stored procedure that runs correctly from SQL. However, when I call the procedure from VB.Net it completes all the process but doesn't release and move on the the next line of code.

I am calling the procedure like I all the others I am using. Could this be a deadlock problem. There is nothing else accessing the database. I do have two cursors inside my procedure.

Thanks in advance for the help.

What I have tried:

calling the procedure differently and modifying the procedure
Posted
Comments
Richard MacCutchan 7-Feb-24 12:13pm    
Since we cannot see either your VB or SQL code, it is anyone's guess what is the problem. Please use the Improve question link above, and add complete details of what is not working.
Dave Kreskowiak 7-Feb-24 12:37pm    
That would tell me the stored procedure is still running, but, like Richard said, since you haven't posted the procedure and the VB.NET code setting up the call and calling it, there's very little anyone can tell you.

1 solution

If the code doesn't appear to be following the correct code flow after calling the stored procedure, it could well be that you have encountered an exception that is interrupting the flow. To test this, wrap the call to the stored procedure in a Try/Catch block and put a breakpoint inside the exception handler to see if this is the case. Beyond that, as Richard and Dave said in response to your question, you have given us nothing to go on as we can't see your code.

Sidenote: Adding that extra bit of exception handling is only there for your quick diagnosis of the problem. You should only add exception handling to the flows of your code that actually need it, e.g. top level exception handling or to aid retry failed operations if appropriate.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900