ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dorin Manoli" <Dorin.Man...@dataireland.ie>
Subject RE: insert using a stored procedure
Date Wed, 22 Nov 2006 08:49:23 GMT
It depend what database engine you use. Code below is for MySQL

Use this code in xml map file under <insert> node and after insert query

<selectKey .... . . . >

                        select LAST_INSERT_ID() as value          

                  </selectKey>

 

________________________________

From: Bob Hanson [mailto:mnbob70@gmail.com] 
Sent: Tuesday, November 21, 2006 6:49 PM
To: user-cs@ibatis.apache.org
Subject: insert using a stored procedure

 

What is the correct method to retrieve the Identity value of a newly
inserted row when using a stored procedure that performs an insert?

Thanks,
Bob


Mime
View raw message