ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emiliano Armellin <earmel...@ateikon.com>
Subject selectkey in sybase
Date Mon, 28 May 2007 09:39:09 GMT

I'm trying the selectkey statement in sybase, using abator generated map 
but I've got this error:

|org.springframework.jdbc.UncategorizedSQLException: SqlMapClient 
operation; uncategorized SQLException for SQL []; SQL state [JZ0TE]; 
error code [0];  
--- The error occurred in 

--- The error occurred while applying a result map. 
--- Check the 
--- Check the result mapping for the '@@identity' property. 
--- Cause: java.sql.SQLException: JZ0TE: Attempted conversion between an 
illegal pair of types. Valid database datatypes are: 'tinyint, smallint, 
int, bit, float, decimal, numeric, char, unichar, varchar, univarchar, 
text, unitext,  money, short money, unsigned bigint'; nested exception 
is com.ibatis.common.jdbc.exception.NestedSQLException:   |

the generated insert:

|  <insert id="abatorgenerated_insert" 
    insert into pgmr.atk_request (emaildest, cdazie, cddipa, profil, 
dtinse, dtulag)
    values (#emaildest:VARCHAR#, #cdazie:VARCHAR#, #cddipa:VARCHAR#, 
      #dtinse:TIMESTAMP#, #dtulag:TIMESTAMP#)
    <selectKey keyProperty="tkreq" resultClass="java.lang.Long">
      select @@identity

it seems correct... so why thi error? I can't set selectkey result map...


Emiliano Armellin

      www.ateikon.com <http://www.ateikon.com>
      earmellin@ateikon.com <mailto:earmellin@ateikon.com>
      *+39 0422 452101*

Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=15653&t=86>
Get Thunderbird <http://www.mozilla.org/products/thunderbird/>

View raw message