We're not going to do this right now, as I think the correct way to do this is to wrap the db2 driver on a lower level in much the same way that the ruby-db2 DBI does it. I.e. we should wrap SQLAllocHandle, SQLSetEnvAttr in python and then it's easy to do this from python.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=98109
sorry, i could'nt attach the patch as a file, so here it is:
*** PyDB2-1.1.0/_db2_module.c 2005-08-02
10:06:17.000000000 +0200
--- _db2_module.c.patched 2006-04-27
22:06:06.000000000 +0200
***************
*** 606,611 ****
--- 606,616 ----
rc = SQLAllocHandle( SQL_HANDLE_ENV,
SQL_NULL_HANDLE, &c->henv );
+ rc = SQLSetEnvAttr( c->henv,
+ SQL_ATTR_ODBC_VERSION,
+ (SQLPOINTER) SQL_OV_ODBC3,
+ 0);
+
rc = SQLAllocHandle( SQL_HANDLE_DBC, c->henv,
&c->hdbc );
rc = SQLSetConnectAttr( c->hdbc,
Logged In: YES
user_id=2003727
Originator: NO
We're not going to do this right now, as I think the correct way to do this is to wrap the db2 driver on a lower level in much the same way that the ruby-db2 DBI does it. I.e. we should wrap SQLAllocHandle, SQLSetEnvAttr in python and then it's easy to do this from python.