Re: Error using MySqlParameter
A couple of thing to look into..
1. Is the column setup in your table to allow null values?
2. Unless you set a parameter you will need to change the "@" to a "?". The new .Net connector uses the "?" by default.
3. If you find the problem but need to have the insert return the new id add this to the end of the insert statement....
; SELECT LAST_INSERT_ID() AS id
and change
myCommand.ExecuteNonQuery()
to
myCommand..ExecuteScalar()
Just replace id with your unique or key column.
Give that a try
Subject
Written By
Posted
November 20, 2004 01:37AM
Re: Error using MySqlParameter
November 20, 2004 03:09PM
November 20, 2004 11:29PM
November 21, 2004 09:23AM
November 21, 2004 05:57PM
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.