Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-26-2005, 10:29 AM   #1
Ryratt
R U a bad enuff dude?
 
Ryratt's Avatar
 
Join Date: Mar 2005
Posts: 76
Default Can you help me with my SQL statement?

I have looked and looked at this statement and it looks the same as my other one in my other ASP script that works, but i keep getting "Syntax Error in Update statement"

Just want to know if you guys can see anything obvious because I have been going over it for 2 days.

UPDATE contactus SET name = 'Wag & Pal', address = '21 Chicago Avenue, Suite 305', city = 'Riverside', state = 'CA', zip = '92507', phone = '(951) 888-8888', fax = '9090909', email = 'emailaddress', memo = 'This is the memo field that can go next to the contact info' WHERE (ID = 1)

ANyway, this is exactly what is going into a variable that goes into the commandText property. I tried it with the parenthesis around ID = 1 and without them.

(I edited the personal info for the record)
Ryratt is offline   Reply With Quote
Old 03-26-2005, 11:23 AM   #2
[Sx]
>Teaching in Progress<
 
[Sx]'s Avatar
 
Join Date: Mar 2005
Location: Serbia
Posts: 666
Send a message via ICQ to [Sx] Send a message via MSN to [Sx] Send a message via Yahoo to [Sx]
Default

try:

Code:
UPDATE `contactus` SET `name`='Wag & Pal', `address`='21 Chicago Avenue, Suite 305', `city`='Riverside', `state`='CA', `zip`='92507', `phone`='(951) 888-8888', `fax`='9090909', `email`='emailaddress', `memo`='This is the memo field that can go next to the contact info' WHERE `ID`='1';
And make sure that none of the entries contains unescaped ' character...
__________________
_______________
http://www.TopFlashers.com
[Sx] is offline   Reply With Quote
Old 03-26-2005, 08:37 PM   #3
Ryratt
R U a bad enuff dude?
 
Ryratt's Avatar
 
Join Date: Mar 2005
Posts: 76
Default

sorry that didn't work either.

UPDATE `contactus` SET `name` = 'Wagyes', `address` = '21 Chicago Avenue, Suite 305', `city = 'Riverside', `state` = 'CA', `zip` = '92507', `phone` = '(951) 888-8888', `fax` = '9090909', `email` = 'emailaddress', `memo` = 'This is the memo field that can go next to the contact info' WHERE `ID` = '1'

Microsoft JET Database Engine error '80040e14'

Syntax error in UPDATE statement
Ryratt is offline   Reply With Quote
Old 03-26-2005, 09:13 PM   #4
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

if this is copy&Pasete

here is one ERROR (mayby more !?)
Quote:
Suite 305', `city = 'Riverside'
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-26-2005, 09:32 PM   #5
Ryratt
R U a bad enuff dude?
 
Ryratt's Avatar
 
Join Date: Mar 2005
Posts: 76
Default

Yeah I saw that earlier and fixed it and it still didn't work, but I figured out what did...

For some reason, I wrapped the table names and feild names in [ ] and it worked. Like I said, I had my original exact method on another ASP page with no [ ] and it worked.... I get upset when computers aren't logical...

UPDATE [contactus] SET [name] = 'Wa & Pel', [address] = '21 Chicago Avenue, Suite 305', [city] = 'Riverside', [state] = 'CA', [zip] = '92507', [phone] = '(951) 888-8888', [fax] = '9090909', [email] = 'emailaddress', [memo] = 'This is the memo field that can go next to the contact info' WHERE [ID] = 1
Ryratt is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:37 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.