Andrew Malara Posted September 19, 2018 Share Posted September 19, 2018 I'm trying to connect to TIBCO Data Virtualization using Python pyodbc. I've installed the drivers following the documentation instructions, created a DSN and have been able to successfully test the connectivity using my DSN with the driverConfig utility and unixODBC with the isql command. However Python pyodbc is throwing the error below on the connect method: conn = pyodbc.connect("DSN=MyDsn") Error: ('08S01', '[08S01] [unixODBC]Unknown host "" (1000) (SQLDriverConnect)') My environment is running Red Hat Enterprise 7.3, Python 3.3 (Anaconda 4.3) Link to comment Share on other sites More sharing options...
Joshua Smith 2 Posted October 15, 2018 Share Posted October 15, 2018 this sounds very similar to the issue we are currently experiencing with a GO (lang) application running in Linux. Even though we have configured the ODBC and successfully tested with the isql utility, GO cannot connect, using unixODBC. :( Numerous sites and forums have suggested, for other DB drivers, to switch the "UTF setting" to 16 bit, as opposed to 8 bit, but I do not know how to do that with TDV. :( Link to comment Share on other sites More sharing options...
Raul Anthony Espinoza Posted October 31, 2018 Share Posted October 31, 2018 Hi, could you give me the documentation about connect python with tdv Please, now i am trying solve the connection and i can not find information about this, I would be very grateful. Link to comment Share on other sites More sharing options...
Joshua Smith 2 Posted October 31, 2018 Share Posted October 31, 2018 update: We determined that the issue was GO lang SQL libraries requiring a UTF-16 driver to work. This was easily testable/demonstratable by using the iusql unixODBC tool which failed with a similar error. We reported this to TDV support and received this response: "Engineering has updated that their investigation showed that the ODBC driver does not have adequate functionality for UTF. This is the reason why the locale=utf-16 setting is not working. They also found that a significant amount of work will be needed to implement the functionality. In view of this, this will be a long-term fix." Link to comment Share on other sites More sharing options...
Raul Anthony Espinoza Posted November 2, 2018 Share Posted November 2, 2018 hello jsmith-0, so it is mean that is imposible connect python with tdv, or it is posible Link to comment Share on other sites More sharing options...
Ajay Mundhra Posted June 7, 2019 Share Posted June 7, 2019 You should be able to connect to TDV using Python. Please find the below sample script for the same. Hope this will help. import pyodbc conn = pyodbc.connect("DSN=DSNNAME") conn.setdecoding(pyodbc.SQL_CHAR, encoding='utf-8') conn.setencoding(encoding="utf-8") cur = conn.cursor() cur.execute("select * from TABLENAME") row = cur.fetchall() print(row) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now