Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

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 October 14th, 2003, 08:07 AM
pgirri pgirri is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 pgirri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Syntax error in INSERT INTO statement

Hi,

This is starting to really do my head in. I have an Access db set up and I am trying to insert data into it via a HTML form.
Can anyone tell me what is wrong with the following lines?

mySQL = "INSERT INTO bud (desc,vendor,contact,quantity,cost,dep,bal,due)"
mySQL = mySQL & "VALUES ('" & request.form("desc") & "','" & request.form("ven") & "','" & request.form("con") & "','" & request.form("qua") & "','" & request.form("cost") & "','" & request.form("dep") & "','" & request.form("bal") & "','" & request.form("due") & "')"
conn.execute(mySQL)

Similar code works fine on another page entering into a different table within the same databse.

Any advice would be greatly appreciated.
Paul.

Reply With Quote
  #2  
Old October 14th, 2003, 08:59 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 1,771 swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 11 h 59 m 28 sec
Reputation Power: 37
change the column desc to another name

Reply With Quote
  #3  
Old October 16th, 2003, 09:12 AM
pgirri pgirri is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 pgirri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your reply, could you advise on how to change the field names within Access, as it appears if it is done either in Design view or Datasheet view it only changes the 'shortcut' name and not the actual field name, a bit frustrating that!

I have even deleted a whole table within Access but can still connect to and read data from it with ASP!

Thank you
Paul.

Reply With Quote
  #4  
Old November 6th, 2003, 04:38 AM
sanjaykattimani sanjaykattimani is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Bangalore, India
Posts: 2 sanjaykattimani User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to sanjaykattimani
Thumbs up thanks

Thanks... even i had the same problem & solved it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Syntax error in INSERT INTO statement


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 5 hosted by Hostway