我在关注 Query 时遇到了错误。据我所知,我写的一切都很好。但它给出的错误是:
“更新查询中有错误”
string insert_query = "update aho set read=?,pick=? where Cont_no='" + contract_no + "'";
OleDbCommand ocmd = new OleDbCommand();
ocmd.CommandText = insert_query;
//ocmd.Parameters.AddWithValue("@contrct_no", contract.Text.ToString());
ocmd.Parameters.AddWithValue("@read_val", Convert.ToInt32(read.Text));
ocmd.Parameters.AddWithValue("@pic_val", Convert.ToInt32(pick.Text));
ocmd.Connection = conn;
ocmd.ExecuteNonQuery();