ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Warren Bell" <war...@clarksnutrition.com>
Subject RE: Cannot convert CRV100 to a numeric(30,6)
Date Sat, 05 Mar 2005 21:11:13 GMT
It's a view, I will test it out.

Thanks

-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Friday, March 04, 2005 1:41 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Cannot convert CRV100 to a numeric(30,6)


This isn't an ibatis error.  It's usually a problem with a join (which
you don't have) or some implicit conversion that takes place somewhere
in the statement.  It can happen inside of views or other indirect
relationships.

Cheers,
Clinton


On Fri, 4 Mar 2005 13:32:21 -0800, Warren Bell
<warren@clarksnutrition.com> wrote:
> I am getting the following Exception message:
>
> ASA Error -157: Cannot convert CRV100 to a numeric(30,6)
>
> I am running Sybase with a JConnect JDBC driver. This is the correct
driver
> for this db. My sql map is:
>
> <resultMap id="get-Item-Result" class="item">
>   <result property="upc" column="INV_ScanCode" javaType="string"
> jdbcType="CHAR" nullValue="NULL"/>
> </resultMap>
>
> <select id="getItem" parameterClass="item" resultMap="get-Item-Result">
>   SELECT INV_ScanCode FROM v_InventoryMaster WHERE INV_ScanCode =
#upc:CHAR#
> </select>
>
> I have simplified this map to locate the problem. The upc property is a
> string and the INV_ScanCode column is a CHAR(14). I have been explicit
about
> the javaType and jdbcType, but the driver still throws this exception. If
I
> run the following map it works fine:
>
> <select id="getItem" parameterClass="item" resultMap="get-Item-Result">
>   SELECT INV_ScanCode FROM v_InventoryMaster WHERE INV_ScanCode =
> '65801011111   '
> </select>
>
> I have tried many different combinations but I can not get it to work. Any
> help will be greatly appreciated.
>
> Thanks,
>
> Warren Bell
> Systems Administrator
> Clark's Nutritional Centers
>
>



Mime
View raw message