
November 13th, 2003, 03:15 PM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Trouble with UPDATE query in Access database using drop down list
I am trying to update an exisitng entry in an Access databse using a dropdown list. It retrieves and displays the correct values from the database.
My problem is that when I try to update the entry, my SQL UPDATE query generates an error when I add the field and variable from the drop down list. I have done all the necessary response.write's to my variables. All show the proper value that is to be UPDATED into the data base. However this is the error that generates when i execute the SQL statement:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/salvages/updatedsalvage.asp, line 59, column 291
Sql = "UPDATE salvage SET idcustomer= "&v_ID&",pic= '"&v_pic&"',car_year = "&v_caryear&",price = "&v_price&",model = '"&v_model&"',link = '"&v_link&"',vehicule_features = '"&v_vfeatures&"',damage_reports = '"&v_dreports&"',make = '"&v_make&"',kilometres = "&v_kilometres&", cruise_control='"v_cruise"' WHERE stock = "&v_stock&""
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
cruise_control is my database field (text datatype)
v_cruise is my variable that hold the request.form("cruisecontrol")
if I take out the cruise control which is generated from a dropdown list..the SQL executes fine!
Can anyone help me?
Jiinxxed
|