ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devine, James" <james.dev...@fmr.com>
Subject RE: Null Parameter Checking
Date Fri, 13 Jun 2008 13:02:26 GMT
Sorry, I guess this was a Sybase issue...nothing to do with iBatis.
To fix this issue, you need to supply the connection with property
JDBC: jdbc:sybase:xxx:host:port?IGNORE_DONE_IN_PROC=true
JNDI: Add/append it to the custom property named customProperties


	From: Devine, James 
	Sent: Thursday, June 12, 2008 5:10 PM
	To: user-java@ibatis.apache.org
	Subject: Null Parameter Checking

	I am using iBatis to run Sybase SP's. 

	In our SP's we have logic like this to check required

	  if (@id is null) 
	    select @error = 21000 
	    select @message = "Input Argument @id is Null, procedure
	    raiserror @error @message 
	    return -1 

	Our sql map looks like this... 
	<parameterMap id="pmap" class="map"> 
	  <parameter property="id" javaType="java.lang.Integer"
jdbcType="INTEGER" mode="IN"/> 

	<procedure id="sp" parameterMap="pmap"> 
	  {CALL someSP(?)} 

	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

	Thanks in advance, 

View raw message