Results 1 to 2 of 2
  1. #1
    Join Date
    May 2010
    Posts
    1

    Unanswered: DB2 doesnt accept question mark(?)

    Hi there,

    I got a error SQLSTATE 01517 saying that the DB2 could not convert the character in the required encoding.

    I suspected that it is something to do with the characters that I have entered in one of the text areas that I had in the application.

    By doing some deletion and modification of some special characters, I learnt that
    the DB2 does not consider question mark(?) as a valid character. When I removed it, the app worked without any error.

    I need some more insight on this - why doesn't DB2 take (?). This is very commonly used character and DB2 should be supporting this. I feel that there is something wrong in the DB2 setup. Can someone please help?

    Is there a workaround for this?

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    DB2 has no restriction on using question marks in strings.

    The question is what your code is trying to do with the strings you are entering. If you don't do proper escaping for strings, you may have a simple SQL injection problem, which turns out to be a syntax error. A question mark that is not inside a string will be interpreted as parameter marker.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •