Open lazarillo opened 3 years ago
These ODBC problems are really hard to debug as ODBC itself doesn't provide any indicators in the error message.
Can you try running the turbodbc
code in an environment where you have manually set ODBCSYSINI=/usr/local/etc
? It could be that turbodbc
and pyodbc
are looking into different paths.
I had a similar issue. Thanks @xhochy, and I can build the connection successfully after I set the path.
Converting from
pyodbc
toturbodbc
I just stumbled upon turbodbc. I am always looking for something to clean up the challenging mess that is connecting to DBs.
Driver File
I have code that already works using
pyodbc
. Here is my.ini
file:Using
pyodbc
Using
pyodbc
-- orsqlalchemy
viapyodbc
-- I can already successfully call this either with a string, like:where
connect_str
is:or using the key-value pairs:
Trying with
turbodbc
But when I try to do the exact same commands with
turbodbc
, it fails. First, with the string:Next, using the key-value pairs:
Next Steps
Because my code already works on
pyodbc
, and it is code in production, I will probably not switch toturbodbc
. But if it is helpful toturbodbc
, I am happy to work together to solve it and end up with a better DB connection. :)I can try to help debug it, if I can be given some guidance. I am fairly strong in Python, but clueless to much of this DB connector world.