What's causing 'unable to connect to data source' for pyodbc?

前端 未结 13 2118
北荒
北荒 2020-12-28 14:34

I\'m trying to connect to an MSSQL database from python on Linux (SLES).

I have installed pyodbc and Free TDS. From the command line:

tsql -H server          


        
13条回答
  •  孤城傲影
    2020-12-28 15:36

    After hours of going in circles it turns out all I was missing was

    TDS_Version = 8.0 in the DSN in my odbc.ini file.

    I had specified it elsewhere, but it needed to be here, too, apparently.

    Hope this helps some other poor soul.

提交回复
热议问题