Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

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 ASP Free Forums Sponsor:
  #1  
Old July 7th, 2004, 06:14 AM
janusz_monkey janusz_monkey is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Birmingham, UK
Posts: 56 janusz_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Error which only happens for this code

Code:
<%
if (Trim(request.form("wantinsurance"))="Y") then
sSQL="UPDATE orders SET giftWrap = 3 WHERE ordID = "&Request.Form("ordernumber")
cnn.Execute(sSQL) // THIS IS LINE 2040
end if
%>


I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.

/vsadmin/inc/inccart.asp, line 2040

I can't see where I am going wrong - please can someone help. The column in the DB is set as type: float.

Thanks!

Reply With Quote
  #2  
Old July 7th, 2004, 06:25 AM
Kris_Vanherck's Avatar
Kris_Vanherck Kris_Vanherck is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Belgium, Antwerp
Posts: 177 Kris_Vanherck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 sec
Reputation Power: 5
check the return from Request.Form("ordernumber")

assuming ordID is a bigint, the request probably gives some unwanted char

Reply With Quote
  #3  
Old July 7th, 2004, 06:53 AM
janusz_monkey janusz_monkey is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Birmingham, UK
Posts: 56 janusz_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
fool

Yup - I'm a fool

I just put the code later on where I know Request.Form("ordernumber") was being called properly and now it works!

Cheers!

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Error which only happens for this code


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 1 hosted by Hostway
Stay green...Green IT