import ibm_db
import ibm_db_dbi
opt={ibm_db.SQL_ATTR_INFO_PROGRAMNAME : 'myapp'}
cn=ibm_db_dbi.connect('SAMPLE','db2admin','******',conn_options=opt)
#cn.close()
# cn.close()
However I don't want to use ibm_db_dbi.connect and would prefer to use ibm_db.connect. I can't find documentation on ibm_db.connect properties, or what I can pass as input parms, in this case conn_options. So I have really 2 questions:
1. How can I set SQL_ATTR_PROGRAMNAME to 'myapp' using ibm_db.connect?
2. How can I find the available input parameters tor methods/functions to either ibm_db or ibm_db_dbi? I've tried dir() in python, which lists methods but not properties/input parms, and searched the IBM and Python doc and can't find official doc, just sample code that others are used or samples in the IBM doc.
If my thinking is wrong (which is usually the case) please correct. Having 2 different modules to use is confusing.
Thank you.