#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Toronto CANADA
    Posts
    2
    Rep 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

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Toronto CANADA
    Posts
    2
    Rep 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]

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  3. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  4. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM
  5. Mouse over questions. n00b. :o
    By Not Tony Danza in forum HTML Programming
    Replies: 2
    Last Post: December 2nd, 2003, 06:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo