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 > Have data in varchar FOR BIT DATA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-08, 10:52
reza_tak2003 reza_tak2003 is offline
Registered User
 
Join Date: Sep 2007
Location: Tehran
Posts: 2
Have data in varchar FOR BIT DATA

Hello
I have got data in DB2 V 9.1 under ZOS. When I select data from Table, I can not see right Character in my application program. By this program I could see easily in DB2 V 7.1 . Instead of right character I see Byte[] Array or Hex string (by two mode BITDATA of DB2 Connect).

Please Help Me.

Last edited by reza_tak2003; 01-31-08 at 10:57.
Reply With Quote
  #2 (permalink)  
Old 01-31-08, 14:10
nidm nidm is offline
Registered User
 
Join Date: May 2003
Posts: 113
Quote:
Originally Posted by reza_tak2003
Hello
I have got data in DB2 V 9.1 under ZOS. When I select data from Table, I can not see right Character in my application program. By this program I could see easily in DB2 V 7.1 . Instead of right character I see Byte[] Array or Hex string (by two mode BITDATA of DB2 Connect).

Please Help Me.

the API detects for bit data, and show its hex value. By book, this is correct behavior.


I think there was a bug for V7, which show the string directly.
Reply With Quote
  #3 (permalink)  
Old 02-01-08, 14:07
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
nidm is correct. If you have binary data (VARCHAR FOR BIT DATA or BLOB), then it is a really bad idea if a client would try to interpret the data as string - unless it really knows that the data has only code points in the current code page, which the DB2 client cannot assume.
__________________
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