ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From charlie bird <zebthe...@yahoo.co.uk>
Subject Re: insert going wrong after going from Sybase to MySQL
Date Fri, 22 Jan 2010 16:35:47 GMT
CORRECTION

select last_insert_id()

Damn these fat fingers

--- On Fri, 22/1/10, StevenF <steven@web2.filipowicz.com> wrote:

> From: StevenF <steven@web2.filipowicz.com>
> Subject: insert going wrong after going from Sybase to MySQL
> To: user-java@ibatis.apache.org
> Date: Friday, 22 January, 2010, 15:19
> 
> Hi All,
> 
> I'm switching the database of an application from Sybase to
> MySQL, but the
> insert statements aren't going well.
> 
> I have this which works for Sybase:
> --------
>     <statement id = "insertChesser"
> parameterClass="nl.chessone40.domain.Chesser"
> resultClass="java.lang.Long">
>         INSERT INTO Chesser
>             (login,
>             password,
>             firstName,
>             lastName,
>             credits)
>         values
>             (#login#,
>             #password#,
>             #firstName#,
>             #lastName#,
>             #credits#)
>         SELECT @@IDENTITY AS value
>     </statement>
> ----------
> 
> The above doesn't work for MySQL, what would I need to
> change to make it
> work for MySQL?
> 
> Any help is very welcome!
> 
> Thanks!
> -- 
> View this message in context: http://old.nabble.com/insert-going-wrong-after-going-from-Sybase-to-MySQL-tp27274795p27274795.html
> Sent from the iBATIS - User - Java mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 


      


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message