Hei all, good day to you!!
I need help to find out whats wrong with my query (I'm using ASP code and Access as the db)
Here's the code :
I've tried to show the SQL query using Response.Write and the result as below :Code:strOpen = request.Form("opencurtain") strMaterial = request.Form("material") strRailings = request.Form("railing") strLining = request.Form("lining") strFitrase = request.Form("fitrase") strTassel = request.Form("tassel") strTieBack = request.Form("tieback") strWidth = request.Form("txtWidth") strLength = request.Form("txtLength") strQty = request.Form("txtQty") strSQL = "SELECT * FROM Material WHERE MaterialID=" & strMaterial rs.open strSQL, db, 3, 3 if not rs.eof then strMaterialName = rs("MaterialName") end if rs.close strSQL = "SELECT * FROM Tassel WHERE TasselID=" & strTassel rs.open strSQL, db, 3, 3 if not rs.eof then strTasselName = rs("TasselHook") end if rs.close strSQLCart = "INSERT INTO CurtainCart (CustomerCurtainCode, Open, Material, Railing, Lining, Fitrase, Tassel, TieBack, Width, Length, Qty) VALUES (" & AP(Request.Cookies("CustomerCode")) & ", " & AP(strOpen) & ", " & AP(strMaterialName) & ", " & AP(strRailings) & ", " & AP(strLining) & ", " & AP(strFitrase) & ", " & AP(strTasselName) & ", " & AP(strTieBack) & ", " & AP(strWidth) & ", " & AP(strLength) & ", " & AP(strQty) & ")" If strSQLCart <> "" Then dbsc.Execute strSQLCart
INSERT INTO CurtainCart (CustomerCurtainCode, Open, Material, Railing, Lining, Fitrase, Tassel, TieBack, Width, Length, Qty) VALUES ('295835493', '2 Ways', 'KEV_0084', 'Wooden', 'With Lining Blackout', 'Without Fitrase', 'Slide 107', 'Without Tie Back', '2', '2', '2')
And also I've tried to append the data manually using Query SQL in Access, and the data is successfully added into the table.
PS : I set all type of data in the table above as a text
I have no idea what did i miss there >.<
Oh, and the error message is :
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
Does anyone could help?
Thx![]()



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks