MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

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 Dev Shed Forums Sponsor:
  #1  
Old September 26th, 2000, 09:17 AM
kyrie26 kyrie26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Toronto CANADA
Posts: 2 kyrie26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Escape Issues : Can't Insert/Update text with "...? sequence

Greetings,

I'm using ColdFusion with MySQL, and have been able to perform Inserts/Updates by escaping double quotes, since my SQL uses double quotes to denote a string. Fine, no problem there.

The problem arises any time there is a question mark that follows a double quote in this text string. Double quotes on their own are fine and don't generate any error, since they are escaped. However, throw in a question mark after a double quote (it doesn't have to be immediately after, either, any number of characters can be in between) and I get this error :

==========================================================
ODBC Error Code = 07001 (Wrong number of parameters)
[MERANT][ODBC MySql driver]Value has not been specified for parameter 1.
Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly.
==========================================================


Does anyone have any ideas? Any help here would be greatly appreciated!


Sincerely,

Gene Chuah


Reply With Quote
  #2  
Old September 27th, 2000, 06:22 AM
kyrie26 kyrie26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Toronto CANADA
Posts: 2 kyrie26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
More Info :

The Question Mark / Double Quote bug seems to be behaving as follows.

Rule: Within a pair of double quotes, a question mark must have a matching single quote preceding it, at any location between it and the first quote. [Technically a matching double quote is acceptable too but we will use single quote since it is visually less prominent.]

Acceptable :

"How're you?"
"'Are you?"

Not acceptable :

"'How're you?"
"Are you?"

HELP!


<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by kyrie26:
Escape Issues : Can't Insert/Update text with "...? sequence

Greetings,

I'm using ColdFusion with MySQL, and have been able to perform Inserts/Updates by escaping double quotes, since my SQL uses double quotes to denote a string. Fine, no problem there.

The problem arises any time there is a question mark that follows a double quote in this text string. Double quotes on their own are fine and don't generate any error, since they are escaped. However, throw in a question mark after a double quote (it doesn't have to be immediately after, either, any number of characters can be in between) and I get this error :

==========================================================
ODBC Error Code = 07001 (Wrong number of parameters)
[MERANT][ODBC MySql driver]Value has not been specified for parameter 1.
Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly.
==========================================================


Does anyone have any ideas? Any help here would be greatly appreciated!


Sincerely,

Gene Chuah

[/quote]


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Escape Issues : Can't Insert/Update text with "...? sequence


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