我有一个 sql 语句,我试图将数据插入到 .mdb 数据库中的表中。我的查询是
"INSERT INTO PROJECT_MASTER VALUES ('" + Project_ID.Text + "','" + Project_Name.Text + "'," +
"'" + Common_Log_ID.Text + "','" + Common_Log_Description.Text + "'," +
"'" + Convert.ToString(Project_Manager.SelectedItem) + "','" + Convert.ToString(Priority_value) + "'," +
"'" + Convert.ToString(Complexity_value) + "','" + Convert.ToString(Status_value) + "'," +
"'" + Convert.ToDateTime(sd) + "','" + Convert.ToDateTime(ed) + "'," +
"'" + Notes.Text + "','" + Convert.ToString(User_Name) + "'," +
"'" + DateTime.Now + "')";
所以我的表有 14 列,第一列是自动编号增量,最后一列是当前日期。除此之外,我只给出了所有其他正确的。
我在 asp.net 中遇到错误,因为“查询值和目标字段的数量不一样”