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

Iulian Ghinea iulian.ghinea at uti.ro
Thu Oct 18 18:26:04 BST 2007

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7443 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20071018/782c51b7/attachment.bin>

More information about the unixODBC-support mailing list