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.