這是我的代碼,我在我的INSERT statement
用於獲取語法錯誤:C#語法錯誤 - INSERT INTO語句。訪問數據庫。
string strSql = "INSERT INTO Responses (OCR, DeadlineDate, OCR Title) VALUES ('"+textBox5.Text+"','"+textBox7.Text+"', '"+textBox6.Text+"')";
OleDbConnection newConn = new OleDbConnection(strProvider);
OleDbCommand dbCmd = new OleDbCommand(strSql, newConn);
newConn.Open();
dbCmd.ExecuteNonQuery();
什麼想法?
避免目前的注入漏洞; http://stackoverflow.com/questions/5893837/using-parameters-inserting-data-into-access-database –