From 893a9c0481ec8b5373f7e494e43d9ef660708a8e Mon Sep 17 00:00:00 2001 From: Bob Kline Date: Wed, 25 Feb 2026 08:18:11 -0500 Subject: [PATCH] Allow fetch of DB2 BLOB There's no pipeline scaffolding for DB2 tests. I have tested locally with DB2 v11.5.8.0, IBM ODBC driver 11.5.0 linux 64, Python 3.12.3. Closes #1411 --- src/dbspecific.h | 1 + src/getdata.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/dbspecific.h b/src/dbspecific.h index e6af0a93..707247f5 100644 --- a/src/dbspecific.h +++ b/src/dbspecific.h @@ -16,6 +16,7 @@ #define SQL_DB2_DECFLOAT -360 // IBM DB/2 DECFLOAT type #define SQL_DB2_XML -370 // IBM DB/2 XML type #define SQL_SS_TIME2 -154 // SQL Server 2008 time type +#define SQL_DB2_BLOB -98 // IBM DB/2 BLOB type struct SQL_SS_TIME2_STRUCT { diff --git a/src/getdata.cpp b/src/getdata.cpp index c401a35a..9b58c185 100644 --- a/src/getdata.cpp +++ b/src/getdata.cpp @@ -725,6 +725,7 @@ PyObject* GetData(Cursor* cur, Py_ssize_t iCol) case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: + case SQL_DB2_BLOB: return GetBinary(cur, iCol); case SQL_DECIMAL: