我有一個sql語句,其中im試圖插入數據到.mdb數據庫,到表中。我的查詢是SQL語句數據插入
"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 + "')";
SO我的表有14列,第1列是自動編號增量,最後一列是當前日期。除此之外,我只給了所有其他正確的。
進出口面臨的一個錯誤「查詢值和目標字段數是不一樣的」在asp.net
感謝ü@vadchen,它解決了我的問題。 – saichandan 2013-02-18 12:23:41