Java Mailing List Archive

http://www.java2.5341.com/

Home » user-java.ibatis »

useGeneratedKeys, data not inserted, ibatis 3.0 trunk and sql 2005

Thanh PHAM

2009-10-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

I tried to use useGeneratedKeys for mssql 2005, latest driver version.
The identity is incremented and everything seem OK but the data is not present in the table.

Here is my xml and log.

<insert id="insertXtp" parameterType="map" keyProperty="id" useGeneratedKeys="true">
    insert into xtp_selectkey (label) values (#{label})
</insert>

setting : <setting name="useGeneratedKeys" value="true"/>

Driver version 2.0.1803.100 sqljdbc.jar
ibatis version : 3.0-beta4 7 Oct 2009

log :
Connection (26) - ooo Connection Opened
PreparedStatement (26) - ==>  Executing: insert into xtp_selectkey (label) values (?)
PreparedStatement (26) - ==> Parameters: title(String)
Connection (26) - xxx Connection Closed
©2008 java2.5341.com - Jax Systems, LLC, U.S.A.