-
Mar 15th, 2011, 03:37 AM
#1
getting returncode from a stored procedure
Hi,
I have a sybase stored procedure which returns a value at the end of the stored proc "RETURN 0"
I created a java class which extends StoredProcedure class and have the following
declareParameter(new SqlOutParameter(RETURN_CODE, Types.INTEGER));
The stored procedure does'nt return any values using the traditional OUTPUT mechanism.
When I execute the class, the stored proc gets invoked, but I get this error " JZ0SG: A CallableStatement did not return as many output parameters as the application had registered for it"
I replaced RETURN_CODE constant with various values such as "RETURN", "return", "RETURN_CODE", but no luck.
Is there anyway I can get the return code of a stored proc ?
Thanks.
-
Mar 15th, 2011, 03:47 AM
#2
getting returncode from a stored procedure
ok, looks like all it needed was the below line
setFunction(true);
It now works and returns the required value. I hope there are no other side affects of using the above call.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules