Bug in mxODBC setconnectoption() with SQL.ATTR_CURRENT_CATALOG?
EdS
edwinstory at yahoo.com
Fri Jan 10 04:26:34 EST 2003
I think I've found a bug in mxODBC setconnectoption(). If I do
dbConnection.setconnectoption( ODBC.SQL.ATTR_CURRENT_CATALOG, "MyTestDB" )
I get
exceptions.TypeError: an integer is required
SQL.ATTR_CURRENT_CATALOG correctly evaluates to 109, the same as
SQL_ATTR_CURRENT_CATALOG in ODBC. It would appear that the second arg to this
call must be an integer, which is the usual case, in all cases.
Other calls such as setconnectoption( ODBC.SQL.ACCESS_MODE,
ODBC.SQL.MODE_READ_ONLY ) work fine.
This is with version 2.0.5.
Does anyone know of a different way to dynamically switch the current db with
mxODBC (as opposed to DATABASE=xxx when connecting)?
Thanks,
Ed
More information about the Python-list
mailing list