kadler / python-ibmdb

Automatically exported from code.google.com/p/ibm-db
2 stars 2 forks source link

Disable SQL_ATTR_CURRENT_SCHEMA in connect on IBM i #10

Closed kadler closed 3 years ago

kadler commented 3 years ago

This line should be part of the else leg: https://github.com/kadler/python-ibmdb/blob/ibmi/IBM_DB/ibm_db/ibm_db_dbi.py#L657

We don't have this attribute on IBM i. While we could call set_current_schema, it's already set when you connect. This attribute is misleadingly named and only needed on Db2 LUW to handle some strange oddity with SQLColumns: https://www.ibm.com/docs/en/db2/11.5?topic=attributes-connection-list#r0006816__current_schema

In addition, the code should really check that connection succeeded before setting it, which is what lead to https://github.com/kadler/python-ibmdb/issues/9