Emiliano,
I think one of the problems is this:
|@@identity
I believe it should be
@@identity@@
-Richard
|Emiliano Armellin wrote:
Hello,
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
com/ateikon/internet/eprogen/dao/ibatis/maps/pgmr/pgmr_atk_request_SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the
pgmr_atk_request.abatorgenerated_insert-SelectKey-AutoResultMap.
--- 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"
parameterClass="com.ateikon.internet.eprogen.domain.pgmr.Atk_request">
insert into pgmr.atk_request (emaildest, cdazie, cddipa, profil,
dtinse, dtulag)
values (#emaildest:VARCHAR#, #cdazie:VARCHAR#, #cddipa:VARCHAR#,
#profil:VARCHAR#,
#dtinse:TIMESTAMP#, #dtulag:TIMESTAMP#)
<selectKey keyProperty="tkreq" resultClass="java.lang.Long">
select @@identity
</selectKey>
</insert>
|
it seems correct... so why thi error? I can't set selectkey result map...
thanks
--
Emiliano Armellin
*
W_
www.ateikon.com <http://www.ateikon.com>
*
@_
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
*
T_
*+39 0422 452101*
Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=15653&t=86>
Get Thunderbird <http://www.mozilla.org/products/thunderbird/>