ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject Re: Unsupported SQL Type 1111 when passing String to VARCHAR field
Date Wed, 23 Dec 2009 20:40:50 GMT
I personally opt for the in-line parameters.

<procedure id="someProc" parameterClass="yourClass">
        {call procName ( 
#searchUserId,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN# ) }
</procedure>

I use this syntax extensively with ASE and don't have any issues.

Chris Mathrusse
christopher.mathrusse@sybase.com
Sybase, Inc




From:
omnipresent <bhaarat.s@gmail.com>
To:
user-java@ibatis.apache.org
Date:
12/23/2009 12:26 PM
Subject:
Unsupported SQL Type 1111 when passing String to VARCHAR field




I have been smashing my head against this for a while now.

I am using iBatis with my JAVA code to run Stored Proc residing in Sybase
DB.

Stored procedure is expecting some parameters. few of them are declared as
VARCHAR (6)

So in my iBatis mapping i did the following for those parameters.

<parameter property="searchUserId" jdbcType="String"
javaType="java.lang.String" mode="IN"/>

However, when I do this I get the following error.

--- Check the statement (update procedure failed). 
--- Cause: java.sql.SQLException: JZ006: Caught IOException:
java.io.IOException: JZ0SL: Unsupported SQL type 1111.
Caused by: java.sql.SQLException: JZ006: Caught IOException:
java.io.IOException: JZ0SL: Unsupported SQL type 1111.

So I changed my parameter mapping to following:

<parameter property="searchUserId" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/>

which got rid of the error above, however, now the parameter searchUserId 
is
getting value of null passed into the SP. I know for sure that from my 
java
code I am NOT passing null.

Has someone faced this issue? what should I change my mapping to??
-- 
View this message in context: 
http://old.nabble.com/Unsupported-SQL-Type-1111-when-passing-String-to-VARCHAR-field-tp26906987p26906987.html

Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org





Mime
View raw message