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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 4th, 2003, 12:33 PM
funky1kanobi funky1kanobi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 funky1kanobi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP/SQL Insert

Hello...

I am using Insert Statements but I get the error "Expected End of Statement"

Here's the code..
SQLINSERT=SQLINSERT & "VALUES ("
SQLINSERT=SQLINSERT & "'" & ContactName & "', "
SQLINSERT=SQLINSERT & "'" & Phone & "', "
SQLINSERT=SQLINSERT & "'" & Email & "', "
SQLINSERT=SQLINSERT & "'" & EQUIP & "', "
SQLINSERT=SQLINSERT & "'" & QTY & "', "

I am new to ASP/SQL and I have tried every variation I know possible with single or double quotes or parenthesis. Any help you can provide is greatly appreciated

Reply With Quote
  #2  
Old July 4th, 2003, 12:50 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I've answered your question at the aspmessageboard.com

go have a look or simply click here:
http://www.aspmessageboard.com/foru...606135&F=20&P=1

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old July 4th, 2003, 01:06 PM
funky1kanobi funky1kanobi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 funky1kanobi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Here is more info....

SQLINSERT="INSERT INTO Truck (ContactName, Phone, Email, EQUIP, QTY, DEST, COMMENT) "


SQLINSERT=SQLINSERT & "VALUES ("
SQLINSERT=SQLINSERT & "'" & ContactName & "', "
SQLINSERT=SQLINSERT & "'" & Phone & "', "
SQLINSERT=SQLINSERT & "'" & Email & "', "
SQLINSERT=SQLINSERT & "'" & EQUIP & "', "
SQLINSERT=SQLINSERT & "'" & QTY & "', "
SQLINSERT=SQLINSERT & "'" & DEST & "', "
SQLINSERT=SQLINSERT & "'" & COMMENT & "') "




SQLINSERT="INSERT INTO Truck (ContactName, Phone, Email, EQUIP, QTY, DEST, COMMENT) "


SQLINSERT=SQLINSERT & "VALUES ("
SQLINSERT=SQLINSERT & "'" & ContactName & "', "
SQLINSERT=SQLINSERT & "'" & Phone & "', "
SQLINSERT=SQLINSERT & "'" & Email & "', "
SQLINSERT=SQLINSERT & "'" & EQUIP & "', "
SQLINSERT=SQLINSERT & "'" & QTY & "', "
SQLINSERT=SQLINSERT & "'" & DEST & "', "
SQLINSERT=SQLINSERT & "'" & COMMENT & "') "


The error is now....Data type mismatch in criteria expression.


Any help is greatly appreciated...

Reply With Quote
  #4  
Old July 8th, 2003, 09:32 AM
programmer programmer is offline
Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 4 programmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
don't use single quotes with numeric values.SQLINSERT=SQLINSERT & QTY & ", "

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP/SQL Insert


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