[unixODBC-support] BLOB and CLOB datatype returned by DB2: -98 and-99 (why?)

Iulian Ghinea iulian.ghinea at uti.ro
Fri Oct 19 12:01:14 BST 2007

(I'm resending this email because I digitally signed the previous email, and
it may not be easily acessible for some email clients)

Dear odbc users,

I'm wondering if someone encountered the same problem with BLOB and CLOB
datatype returnet by SQLDescribeCol function when the server is DB2.

On the client machine I have DB2 rtlc client: "DB2 v9.1.0.0", "s060719",
"LINUXIA32", and Fix Pack "0"
On server machine I have the DB2 server: "DB2 v8.1.2.97", "special_15462",
"MI00142_15462", and FixPak "10"

I am connecting using unixODBC-2.2.11-21.4 on a SLES 10, or
unixODBC-2.2.8-55 on SuSE 9.1. The same problem with both:

When retriving a BLOB column, the datetype returned is -98 (not defined in
sqlext.h) and when retriving CLOB, the returned type is -99. If I handle
this (when I encounter this datatype -98 or -99, I use SQL_C_BINARY for
retriving the data in the column) everything is working.

But I was expecting that the datatype would be SQL_BINARY (-2) or
SQL_LONGVARCHARBINARY (-4) as it is with SQL Server, Firebird or Oracle, and
not -98 or -99.....

Does someone encountered this particular problem ?
Is this a known issue, or am I missing someting ?

Thank you
Best regards!

Iulian Ghinea

More information about the unixODBC-support mailing list