Update statement - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > ASP » Update statement


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-08-2006   #1 (permalink)
peyton
Junior Member
 
Join Date: Jul 2006
Age: 28
Posts: 5
Default Update statement

Hi,

I have this variable


when I update the table it gives an error

here is my update code
Code:

str= "UPDATE tblnames SET Name = '" & name & "' WHERE Id ='" & getid & "'"

can someone tell me what’s wrong with it because the name variable has a comma in it

Thanks
Peyton
peyton is offline   Reply With Quote


Old 07-10-2006   #2 (permalink)
Minakshi
Junior Member
 
Join Date: Jul 2006
Age: 39
Posts: 8
Default

Hi,
Check the declaration of the name variable. Something might be wrong there only. Have you enclosed it in quotes while declaring it in your code? The statement otherwise looks fine.
Minakshi is offline   Reply With Quote

Old 07-13-2006   #3 (permalink)
Tom Tom
Junior Member
 
Join Date: Jul 2006
Age: 48
Posts: 25
Default

The syntax for UPDATE is

UPDATE <table name>
SET <column> = <value> [,<column> = <value>]
[FROM <source table(s)>]
[WHERE <restrictive condition>]

str= "UPDATE tblnames SET Name = '" & name & "' WHERE Id ='" & getid & "'"

This looks ok but, but i am not sure about your ID, is this a string or a numeric value?
Tom Tom is offline   Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with include in an if statement cameron ASP 2 08-15-2007 04:37 PM


footer left
All times are GMT. The time now is 04:34 AM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Electricity Suppliers | Mobile Phones | Loans | Mortgage Calculator | Personal Loans

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49