thanks for the answer, I've just tried with no success
the error is the same!
I'm using jconnect6, asa 9 and ibatis 2.3
where is the error?
[EMAIL PROTECTED] ha scritto:
I think you need to specify the
alias as follows:
<selectKey keyProperty="tkreq" type="post" resultClass="java.lang.Long">
select @@IDENTITY AS tkreq
</selectKey>
and
it is always a good idea to specify the type. (pre or post) I can't
remember which is the default so I always specify the value so it is
clear. This should work as I am using it with Sybase ASE 12.0 without
any issues.
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
|