Hello,
I am using iBatis to run Sybase SP's.
In our SP's we have logic like this to check required parameters:
if (@id is null)
begin
select @error = 21000
select @message = "Input Argument @id is Null, procedure
terminated."
raiserror @error @message
return -1
end
Our sql map looks like this...
<parameterMap id="pmap" class="map">
<parameter property="id" javaType="java.lang.Integer"
jdbcType="INTEGER" mode="IN"/>
</parameterMap>
<procedure id="sp" parameterMap="pmap">
{CALL someSP(?)}
</procedure>
I was expecting to get a SQLException if a null id was passed in, but
instead, it is returning a result of 1 (I assume to indicate failure).
2 questions:
1) Do you know if this can be configured to throw an exception?
2) Do you know why this is returning 0 for success and 1 for failure
instead of the impacted row count (as stated in the java doc for
SqlMapExecutor.update())?
Thanks in advance,
Jim