ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old February 27th, 2008, 01:47 AM
phuc2583 phuc2583 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 phuc2583 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 32 sec
Reputation Power: 0
Syntax error in UPDATE

I don't think my code get to error;
please check the code for me
i have found but i can see where error was
this is my code UPDATE:
if trim(request("Option"))="EditCustomer" then
CustomerId = trim(request.form("CustomerId"))
strupdate="UPDATE customer SET CustomerId ='"&CustomerId&"',firstname='"&Firstname&"'"&","
strupdate=strupdate&"Lastname ='"&lastname&"',Gender='"&Gender&"'"&","
strupdate=strupdate&"email ='"&email&"',phone='"+phone+"'"&","
strupdate=strupdate&"nation ='"&nation&"',customertype ='"&customertype&"'"&","
strupdate=strupdate&"note='"&note&"',status='"&statuss&"'"
strupdate=strupdate&"WHERE CustomerId ='"+request.QueryString("CustomerId")+"';"

'response.Write(strupdate)
Set rs = Conn.execute(strupdate)error line
Response.Redirect("ListCustomer.asp")
rs.Close
Set rs=nothing
end if
thanks
Regards
Hoang Phuc

Reply With Quote
  #2  
Old February 29th, 2008, 12:24 AM
vimalraj vimalraj is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 30 vimalraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 52 m 57 sec
Reputation Power: 5
Hi,

Ur code looks fine but u can do one thing. uncomment the response.write statement and comment the next few lines. Then you will get the final query in your browser. Then check whether it is correct. ie if the values from the variables are coming right or not and the spacings between keywords. You can also copy and paste the query into ur database query engine and check if it is generating any error or not.
if even that fails you can post the generated query in this forum may be i can help you out.

Code:
response.Write(strupdate)
'Set rs = Conn.execute(strupdate)error line
'Response.Redirect("ListCustomer.asp")
'rs.Close
'Set rs=nothing


Happy Programming,
Vimal Raj
http://techisolutions.blogspot.com

Quote:
Originally Posted by phuc2583
I don't think my code get to error;
please check the code for me
i have found but i can see where error was
this is my code UPDATE:
if trim(request("Option"))="EditCustomer" then
CustomerId = trim(request.form("CustomerId"))
strupdate="UPDATE customer SET CustomerId ='"&CustomerId&"',firstname='"&Firstname&"'"&","
strupdate=strupdate&"Lastname ='"&lastname&"',Gender='"&Gender&"'"&","
strupdate=strupdate&"email ='"&email&"',phone='"+phone+"'"&","
strupdate=strupdate&"nation ='"&nation&"',customertype ='"&customertype&"'"&","
strupdate=strupdate&"note='"&note&"',status='"&statuss&"'"
strupdate=strupdate&"WHERE CustomerId ='"+request.QueryString("CustomerId")+"';"

'response.Write(strupdate)
Set rs = Conn.execute(strupdate)error line
Response.Redirect("ListCustomer.asp")
rs.Close
Set rs=nothing
end if
thanks
Regards
Hoang Phuc

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Syntax error in UPDATE


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