Host OS: Ubuntu 24.04
Container OS: Ubuntu 22.04
Container Python: Python 3.10
Running inside a virtual environment.
PyODBC Version: 5.1
My /etc/odbc.ini
configuration is as follows:
[ODBC]
Trace = yes
TraceFile = /tmp/odbc.trace
[Tibero7]
Driver = Tibero7Driver
Description = Tibero7 ODBC Datasource
SID = tibero
User = tibero
Password = tmax
In this environment, executing the following Python code results in an error:
import pyodbc
conn = pyodbc.connect("DSN=Tibero7")
Error message:
Error: ('0000', '[0000] (-17001) (SQLDriverConnect)')
The error code -17001
from Tibero indicates: Login failed: invalid user name or password
.
However, if I uninstall PyODBC 5.1 and install PyODBC 4.0.39, the connection is established without any issues.
Upon reviewing the PyODBC code, it appears that starting from version 5.x, the keys user
and password
are transformed to uid
and pwd
. I would like to understand if this transformation only applies to the kwargs and connection string, or if it also affects the odbc.ini
file.
If this transformation does affect the odbc.ini
file, how can I configure it to send the user
and password
keys/values to the driver without transformation?
Thank you for your assistance.
I tested pyodbc 4.0.39 and 5.1 versions. and read unixodbc code.
I want to use pyodbc 5.x versions and tibero odbc dirver.