1
//Query SQL
MySqlCommand command1 = new MySqlCommand("INSERT INTO Equipamento (equipamento, situacao, modelo, nr_serie, avaria, estado_equipamento, data, estado_reparacao, reincidente, ID)" +
"VALUES(@equipamento, @situacao @modelo, @nr_serie, @avaria, @estado_equipamento, @data, @estado_reparacao, @reincidente, @id)", mConn);
command1.Parameters.AddWithValue("@equipamento", comboequipamento.Text);
command1.Parameters.AddWithValue("@situacao", "Em diagnóstico");
command1.Parameters.AddWithValue("@modelo", tbmodelo.Text);
command1.Parameters.AddWithValue("@nr_serie", tbserie.Text);
command1.Parameters.AddWithValue("@avaria", tbavaria.Text);
command1.Parameters.AddWithValue("@estado_equipamento", tbestado.Text);
command1.Parameters.AddWithValue("@data", Convert.ToString(DateTime.Today.ToShortDateString()));
command1.Parameters.AddWithValue("@estado_reparacao", null);
command1.Parameters.AddWithValue("@reincidente", 1);
command1.Parameters.AddWithValue("@id", tbid.Text);
//Executa a Query SQL
command1.ExecuteNonQuery();
reincidentestr = true.ToString();
Atribuir_IDFichaHTML();
약간의 도움을 얻을 수 있습니까? 임 가 실행될 때 Column count doesn't match value count at row 1
을 얻습니다.C# MySQL 오류 "열 개수가 1 행의 값 개수와 일치하지 않습니다."