Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Error handling in Stored Procedures called in Java

Author  Topic 

kumar_iitm
Starting Member

1 Post

Posted - 2005-07-13 : 07:09:45
Text
Hi,
We are running stored Procedurs from Java. In the stored procedures, we used error handling to roll back the transactions.

SELECT @intErrorCode = @@ERROR
IF (@intErrorCode <> 0) GOTO PROBLEM
Where the PROBLEM has the rollback transaction code. We used eror handling mainly at the insertions.
When i run the stored procedure from the Query Analizer, if there is any error in any of the inserts it's coming to the Problem statement and rooling back the trasaction and continuing wiht the rest of the inserts.
But the same if i run the java code which calls the Stored Procedure, the Error is thrown back to the java prog, where the insert is failed and i couldn't get any of the out parameters of the Stored Procedure.
Is there any way where i can suppress these errors so that they wont thrown back to Java program.

   

- Advertisement -