I have a problem connecting to an instance of Microsoft SQL Server with pyODBC on an Ubuntu (12.10) machine Ubuntu (12.10) .
The error I am returning is:
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data Source name not found, and no default driver specified (0) (SQLDriverConnect)')
The am connection string is used for pyodbc:
self.corpus_cnxn = pyodbc.connect('DRIVER={FreeTDS};SERVER=UKEDN-06880;DATABASE=db1;UID=user;PWD=pass')
This is similar to working with pyODBC on Windows (you just need to change DRIVER to "SQL Server" instead of "FreeTDS"), and it works fine when I try to connect to an Ubuntu machine using the tsql tool from the terminal with the following command:
tsql -S UKEDN-06880 -p 1433 -U user -P pass
I can select any table without problems, it just does not work from pyODBC.
Any help or advice would be greatly appreciated, my Linux skills are weak and I am completely stuck, although since it works from tsql I feel very close!
Toosik
source share