正如標題所示,嘗試從ASP執行對MS Access數據庫的以下插入查詢時出現語法錯誤.NET頁面。語法錯誤異常詳細信息:System.Data.OleDb.OleDbException:INSERT INTO語句中的語法錯誤
sqls = "INSERT INTO Invoice(Date, S_OF, Consignee_name, Vechile_type, Make, Model,
Chassis_no, Transmission, Fuel_Type, Mile_age, Colour,
Engine_type, Wheel_Drive, Accesories_options, FOB_Price,
Fright_Price, Insurance, inspection, Port_of_Loading,
Destination, Drive, Total)
VALUES('" + date1.Text + "','" + Sof.Text + "','" + consigneee.Text + "','" +
dvtype.Text + "','" + make.Text + "','" + Model.Text + "','" + chassisno.Text +
"','" + dtransmision.Text + "','" + dfueltype.Text + "','" + mileage.Text + "','"
+ dcolour.Text + "','" + enginetype.Text + "','" + dwheeldrive.Text + "','"
+ labelc.Text + "','" + FobPrice.Text + "','" + frieghtprice.Text + "','"
+ insurance.Text + "','" + inspection.Text + "','" + portofloading.Text
+ "','" + portdestination.Text + "','" + ddrive.Text + "','" + total.Text + "')"
更改該查詢使用參數!你得到了什麼錯誤? –
是的,請使用參數。閱讀SQL注入。 – iamkrillin
發佈確切的錯誤訊息。有點諷刺的是,你使用的唯一標籤是'error-message',但你沒有在你的問題中發佈錯誤消息。 –