|
|
getting sql errorcode after execute on StoredProcedure
Hi All,
I am trying to get sql errorcode after executing sybase stored procedure.
I am using SpringStoredProcedure class and when we call execute on SpringStoredPrprocedure it returns HashMap object.
In some situation procedure returns errorcode also. My question is what is the best way of getting errorcode back after calling execute on StoredProcedure().
Also is there any way I can get the original SQLException back
Thanks
Yogish
How would you normally get the errorcode back from Sybase? If its an output parameter you would just declare the output parameter in the StoredProcedure object by name and get the name from the Map.
The original SQLException is nested inside of the DataAccessException thrown by Spring. You can get nested exceptions with getCause.
Hi
Thanks for that..., well, we are not returning error code through out param.we directly return the errocode from procedure based on that we handle in persistance layer.
Now i am able to get SQLException back using getCause() ...
thanks
Yogish |
|