Re: Lots of problems with VB.NET and MySQL
Posted by: Sammy Age
Date: February 13, 2005 07:46PM

Erika, Im a newbie in MySQL as well but i know the @@identity is not supported in mySQL. to get the same results you need to use LAST_INSERT_ID()

'this assumes you already added your data to the database
Dim StrSql as String = "Select LAST_INSERT_ID()"
        objSqlCommand = New MySqlCommand(StrSql, objSqlConn)
        objSqlCommand.ExecuteScalar()
        Response.Write("RESULT IS " & objSqlCommand.ExecuteScalar().ToString())

hope this helps

Options: ReplyQuote


Subject
Written By
Posted
Re: Lots of problems with VB.NET and MySQL
February 13, 2005 07:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.