ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 13th, 2003, 03:15 PM
Jiinxxed Jiinxxed is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 Jiinxxed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old November 14th, 2003, 02:53 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,957 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 15 h 35 m 19 sec
Reputation Power: 802
Did you forget a couple & around v_cruise in you sql?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Trouble with UPDATE query in Access database using drop down list


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT