Java (JDBC) exception for already handled error from SQL Server Stored Procedure

From: Steve Qian (steve_qian_at_excite.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 16:26:03 -0700

We are using Java (JDBC) calling one stored procedure in SQL server. This procedure has some input and out parameters.

In our stored procedure, we anticipates an error (@@error) from one of our sql statement, i.e. select @sql_err=@error.

We will ignore it if the error is 207, and proc will keep going successfuly.

But somehow when Java code finished execute this SP, it will still error out when trying to retrieve the output parameters.

We would appreciate any help.

Thanks

Steve



Relevant Pages

  • Re: Stored Proc Recompile
    ... In order to promote re-use of query plans, our java application is using ... This method of invoking the stored procedure should not trigger a ... My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis ...
    (microsoft.public.sqlserver.server)
  • Re: Why use Java Stored Procedures....
    ... Aside from Microsoft databases, most well-known databases support java ... but that is not a Stored Procedure) I ...
    (comp.databases.oracle.server)
  • TDS_RET_STATUS exception
    ... high enough the occasional deadlock can occur. ... This is ok as the java code that executed the deadlocked CallableStatement ... However, what I'm currently getting is that the first retry attempt fails, ... found for the stored procedure output parameters. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Java method invocation support
    ... provides this capability based on the article at ... The short answer is no but you get .NET in SQL Server 2005. ... code in T-SQL or write an "extended stored procedure". ... marketing-wise is the same as Oracle's Java capabilities. ...
    (comp.databases.ms-sqlserver)
  • Re: Where do business rules belong... OCP and SPs
    ... problem with using a stored procedure is. ... that proc only through that interface. ... Say, in Java: ...
    (comp.object)