|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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] |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Escape Issues : Can't Insert/Update text with "...? sequence |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|