MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL 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:
Laplink Gold 2008 - $15 Off with Coupon Code CJM9NE
  #1  
Old July 26th, 2002, 11:57 AM
nate nate is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 5 nate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry mySQL Text Field and Update

Ok, I've been working on this for about 3 hours now and I'm fed up.

*breathes deeply*

I have the following sql string (using ASP and mySQL):

sql = "UPDATE Needs_post SET cat_id="&cat_id&", title='"&title&"', desc='"&desc&"', fulfilled='"&fulfilled&"', requester='"&requester&"', phone='"&phone&"', notes='"&notes&"' WHERE id = " & request("id")



.... and it errors out with:

ADODB.Recordset.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'desc='blahblahblah' at line 1


/stuff/admin_edit_post.asp, line 34 /html


... the desc field is a multi-line textbox with virtual wrapping turned on (it doesn't matter about the wrapping anyway, even if I change that, it still gets the same error).

... the field in the database is "text" type and no other attributes or extras... it's supposed to be very simple.

Any ideas?

Reply With Quote
  #2  
Old July 26th, 2002, 12:17 PM
nate nate is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 5 nate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think I got it, correct me if I'm wrong..

So, correct me if I'm wrong.. but is "desc" a reserved word in mySQL databases or ChiliSoft or something like that? I can't believe it, but when I changed the table to "descrip" instead, and all the variables and everything, it worked... so far..

am I wrong in that assumption?

Wee-tarded.

Reply With Quote
  #3  
Old July 26th, 2002, 01:16 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
dont worry, it once took me 2 days to realise that my description field called 'desc' was causing me heaps of errors! dont worry it happens to the best of us.

Reply With Quote
  #4  
Old July 26th, 2002, 02:34 PM
obscurant obscurant is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 2 obscurant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yeah, reserved by sql92 standard.

Some reserved words (from postgres docs)

Reply With Quote
  #5  
Old July 26th, 2002, 02:36 PM
nate nate is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 5 nate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Another one?

So, what about cat_id? or catid? where can I get a list of the reserved words.. I think I just think along the programmer's lines too much, and I'm brand new at the mySQL db end. I typically work with access and postgreSQL...

thanks.

Reply With Quote
  #6  
Old July 26th, 2002, 02:38 PM
nate nate is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 5 nate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the list.. that helps.. looks like we posted at the same time.. heh..

anyway,

i'm having another prob with an Illegal operation on this line (I'll put in a few of them with an -> next to the one that's giving me the prob.)



rs.addnew
rs("organiz_id") = organiz_id
-> rs("cat_id") = request("catid")
rs.update

any ideas from just that? It's a select sql statement, then I'm running this. what's the deal?

Reply With Quote
  #7  
Old July 26th, 2002, 02:43 PM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to Lindset Send a message via AIM to Lindset
That's why I always use some sort of prefix on both tables and columns.. for example for my category table I have cat as the prefix for columns.. Like catId or catName
__________________
Best Regards,
Håvard Lindset

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > mySQL Text Field and 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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway