I am still getting the same exception message: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -157: Cannot convert CRV100 to a numeric(30,6)
I have tried the sql map below and it works: <select id="getItem" parameterClass="item" resultMap="get-Item-Result"> SELECT INV_ScanCode FROM StockInventory WHERE INV_ScanCode = '65801011111 ' </select> I have tried this sql map and it does not work: <select id="getItem" parameterClass="item" resultMap="get-Item-Result"> SELECT INV_ScanCode FROM StockInventory WHERE INV_ScanCode = #upc:CHAR# </select> upc is a String and I have had it equal '65801011111 ', 'abcde' and '65801011111'. I get the same exception with all three. I replaced the view I was using with the table StockInventory. Why does the first map work and the second does not? Is this still a driver issue? -----Original Message----- From: Warren Bell [mailto:[EMAIL PROTECTED] Sent: Saturday, March 05, 2005 1:11 PM To: [email protected]; [EMAIL PROTECTED] Subject: RE: Cannot convert CRV100 to a numeric(30,6) It's a view, I will test it out. Thanks -----Original Message----- From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 1:41 PM To: [email protected] 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 <[EMAIL PROTECTED]> 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 > >

