This is my code:
String cmdText = ("UPDATE sinhvien SET Ho= '" + HoSV + "',Ten = '" + TenSV + "', Ngaysinh= '" + dateTimePicker1.Value.ToString("yyyy/MM/dd") + "',Ghichu='" + GhiChu + "',Diemthi = '" + DiemThi + "' WHERE idSinhVien =" dataGridView1.SelectedRows[0].Cells[0].Value.ToString()IDSinhVien);
MySqlCommand cmd = new MySqlCommand(cmdText, constr);
cmd.ExecuteNonQuery();
I cannot update, if i change idsinhvien = int => success. but mysql idsinhvien= varchar => error