|
Hello Pablo, Your code snippet works well. Much thanks! Regards, Gary Russo Gary P. Russo MSN IM: [EMAIL PROTECTED] From: Pablo López
[mailto:[EMAIL PROTECTED] Hi Gary, Have a look at my map, it’s working
for me. Sorry it’s in Spanish. I didn’t look at your code deeply
enough but I guess that you need to retrieve the id BEFORE you insert the user
(in SQL Server) and select it as VALUE, so you can return it back.
<insert id="InsertarUsuario" parameterClass="Usuario"> <selectKey property="IdUsuario" resultClass="int"> SELECT
cast(@@IDENTITY as int) as value </selectKey>
INSERT INTO usuarios (dni, nombre, apellido1,
apellido2,
telefono1,
telefono2, email, fotografia,
vehiculo,
matricula, plaza)
VALUES (#Dni#, #Nombre#, #Apellido1#,
#Apellido2#,
#Telefono1#,
#Telefono2#, #Email#, #Fotografia#,
#Vehiculo#,
#Matricula#, #Plaza#)
</insert> In case you need further info just, just
ask again J See you, Pablo. |
- auto-key generation example Russo, Gary
- Re: auto-key generation example oleksa borodie
- RE: auto-key generation example Pablo López
- RE: auto-key generation example Russo, Gary
- Re: auto-key generation example oleksa borodie
- RE: auto-key generation example Pablo López
- Re: auto-key generation example Larry Meadors
- Re: auto-key generation example oleksa borodie
- RE: auto-key generation example Russo, Gary
- RE: auto-key generation example Russo, Gary

