mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.92k stars 561 forks source link

Failed to connect using 4.0.34 version #1095

Closed achettyiitr closed 1 year ago

achettyiitr commented 2 years ago

Issue

Getting this particular error for DSN-less connection string for the recent version 4.0.34. It's working with the 4.0.32 version.

('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')

v-chojas commented 2 years ago

Check where your odbcinst.ini is. 4.0.34 came with its own version of unixODBC which might not be looking for the odbcinst.ini in the same place as the one you installed.

achettyiitr commented 2 years ago

Sorry, @v-chojas. I added the description incorrectly. It's working with 4.0.32. Not working with the current released version 4.0.34

achettyiitr commented 2 years ago

Check where your odbcinst.ini is. 4.0.34 came with its own version of unixODBC which might not be looking for the odbcinst.ini in the same place as the one you installed.

I have both the files obdc.ini and odbcinst.ini empty since I am opting for a DSN-less connection string and specifying the Driver as well in the connection string itself. But with the current released version, it was kind of looking for configuration in these files instead of being specified in the connection string itself.

Atheuz commented 2 years ago

4.0.34 is broken because it includes old libraries. I recommend not using it until it is fixed, and instead use 4.0.32.

v-chojas commented 2 years ago

Indeed, avoid '34. It has already caused these problems reported here: https://github.com/mkleehammer/pyodbc/issues/1082 https://github.com/mkleehammer/pyodbc/issues/1083 https://github.com/mkleehammer/pyodbc/issues/1081 https://github.com/mkleehammer/pyodbc/issues/1079

TroyWitthoeft commented 2 years ago

Reporting in with similar issues.

v-chojas commented 2 years ago

We know. 4.0.34 is broken.

TroyWitthoeft commented 2 years ago

@v-chojas Good luck on the fix! Appreciate the feedback.

gordthompson commented 1 year ago

pyodbc 4.0.35 has been released.