如何解决MySql.Data.MySqlClient.MySqlException
?它向我显示此消息:
您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,以在第1行的``,municipi = aaa'其中id ='1''附近使用正确的语法
private void BModifica_Magatzem_Click(object sender, EventArgs e)
{
BaseDades bd = new BaseDades();
magatzem st = new magatzem();
st = mg[numEsc];
String sql = "update almacen set id_almacen='" + TB_ID.Text + "',nom_almacen='" +
TB_NOM.Text + "',pais=" + TB_PAIS.Text + "',municipi=" + TB_MUNICIPI.Text + "'where id='" + st.Id_alamcen + "';";
bd.ExecutaSql(sql, bd.getConnection());
}