Bill Homan <member35043dbforums.com> wrote in message news:<3203554.1060104571dbforums.com>...
> I am trying to retrieve a GUID from a DB2 version 8 database using OLE
> DB and ADO using C++. The data is stored in the table as type char(16)
> for bit data. The ADO GetValue function is returning a string of all
> ??????. Any thoughts on how to store this differently or retrieve the
> data differently?
What is actually in the CHAR(16) FOR BIT DATA data? If it is binary
data, you could possibly apply the HEX function to convert the data to
its hexadecimal representation VARCHAR(32).

$ db2 "values hex(cast(x'1234567890ABCDEF' as char(8) for bit data))"

1
----------------
1234567890ABCDEF

1 record(s) selected.