Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Please help me with this update

$
0
0

Hi

Please can someone tell me why this update statment gives me error?

 OdbcConnection connection = new OdbcConnection("Dsn=produtos;server=localhost;uid=***;pwd=***;database=***;port=3306");
        OdbcCommand command = new OdbcCommand("UPDATE perfumes SET preco=? WHERE id=?)", connection);
        command.Parameters.AddWithValue("@pvp", 11.55);
        command.Parameters.AddWithValue("@id", 11);
        connection.Open();
        command.ExecuteNonQuery();
        connection.Close();

Got

ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.5.16]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1


Viewing all articles
Browse latest Browse all 1350

Trending Articles