If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 doesnt accept question mark(?)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-10, 06:58
rupeshkumar_rj rupeshkumar_rj is offline
Registered User
 
Join Date: May 2010
Posts: 1
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?
Reply With Quote
  #2 (permalink)  
Old 05-03-10, 07:23
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On