Its pretty much the same thing, just add your additional parameter
statements comma separated. You can even specify output parameters as
well, to return values from the proc other than a rowset. You can also, if
you would like, specify the parameter name. ASE has no issue with this and
sometimes this makes the code more readable.
<procedure id="someProc" parameterClass="yourClass">
{call procName (
#searchUserId,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
,
#someOtherParam,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
, @SupportLevel =
#namedParam,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
,
#myOutParam,jdbcType=VARCHAR,javaType=java.lang.String,mode=INOUT#
)
}
</procedure>
I hope this helps....
Chris Mathrusse
[email protected]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
From:
<[email protected]>
To:
[email protected]
Date:
12/23/2009 01:05 PM
Subject:
Re: Unsupported SQL Type 1111 when passing String to VARCHAR field
Thanks let me try that.
but what if I have multiple parameters going to this SP how will the
syntax be then?
<procedure id="someProc" parameterClass="yourClass">
{call procName
(#searchUserId,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#,#someotherParm,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
) }
</procedure>
is that correct?
cmathrusse wrote:
>
> 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
> [email protected]
> Sybase, Inc
>
>
>
>
> From:
> omnipresent <[email protected]>
> To:
> [email protected]
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
>
>
>
Quoted from:
http://old.nabble.com/Unsupported-SQL-Type-1111-when-passing-String-to-VARCHAR-field-tp26906987p26907155.html