SunQuest
           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 August 7th, 2003, 09:23 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
Concatination problems with form variables

this is really weird. i'm building a sql statement, and i want to concatinate a string right next to a form variable. well it wont let me, so i think. here's the syntax i'm using and the error. well actually the syntax is in the error.
Code:
Microsoft VBScript compilation error '800a0401' 

Expected end of statement 

/editdetail.asp, line 10 

makechanges="update sheetlog set datein = '"&request.form("datein")&" 12:00:00 PM', keyedinby = "&request.form("inby")&happy&" where logid = "&request.querystring("edid")
---------------------------------------------------------------------------------------------------------------------------^


says there is something wrong with 'happy'. its just a string made up of either form variables and strings or just a string.

Reply With Quote
  #2  
Old August 7th, 2003, 09:39 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 8
use proper spacing
Code:
makechanges="update sheetlog set datein = '" & _
    request.form("datein") & " 12:00:00 PM', keyedinby = " & _
    request.form("inby") & happy & _
    " where logid = " & request.querystring("edid")

i don't know about ASP but in VB6 happy& would be a Long data type variable. it's probably seeing it as that and not concatination.
__________________
Programmer's Corner

Reply With Quote
  #3  
Old August 7th, 2003, 09:45 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
awesome. didn't realize that the spacing made such a huge difference! thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Concatination problems with form variables


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