|
cfreema7 -> Ampersand in name causes error in INTO statement (9/7/2003 19:44:19)
|
Another issue in the same vein: The information gets entered into a purchase_order database, and now I'm getting a: "[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. " I notice this happens on the cards where the card has "&" in the title, like "Hotel & Casino". This is the SQL statement: SQLQuery = "insert into ShopCart " & _ "(ProductName, UnitPrice, ShippingCost, Message, SenderName, SenderEmail, RecName, RecAddress1, RecAddress2, RecCity, RecState, RecZip, RecCountry, SessionID, ProductID, Qty, EntryDate) values " & _ "('"& Session("ProductName") & "', " & session("ProductUnitPrice") & "," & session("ShippingCost")& ", '" & replace(session("message"),"'","''") & "', '" & session("SenderName") & "', '" & session("SenderEmail") & "','" & session("RecName") & "','" & session("RecAddress1") & "','" & session("RecAddress2") & "','" & session("RecCity") & "','" & session("RecState") & "','" & session("RecZip") & "','" & session("RecCountry") & "','" & uniqueID &"'," & Session("ProductID") & ", 1, '" & cstr(date()) & "')" ProductName is the title that contains the "&" and is causing the error, but I don't know how to isolate it. Is it possible to do this, or should I just remove the "&"? Thanks again
|
|
|
|