更新时间:2023-12-06 17:15:22
你应该试试这段代码而不是你的代码。
you should try this code instead of your code.
SqlCommand command = new SqlCommand("UPDATE SAPProduction.ProductionData SET Rejection=@Reject,Remark=@Remark Where id = '" + dataGridView1.CurrentRow.Cells["id"].Value.ToString() + "' ", objConn1);
SqlCommand command = new SqlCommand(UPDATE SAPProduction.ProductionData SET Rejection = @ Reject,Remark = @ Remark where id ='+ dataGridView1.CurrentRow.Cells [id]。Value.ToString()+',objConn1);
SqlCommand command = new SqlCommand("UPDATE SAPProduction.ProductionData SET Rejection=@Reject,Remark=@Remark Where id = '" + dataGridView1.CurrentRow.Cells["id"].Value.ToString() + "' ", objConn1);