Pypyodbc: Can't open lib 'FreeTDS' : file not found") error when trying to connect to SQL server

前端 未结 2 701
半阙折子戏
半阙折子戏 2021-01-01 13:45

I\'m trying to connect to a SQL Server using Pypyodbc on Mac and I\'m getting the following error:

pypyodbc.DatabaseError: (\'01000\', \"[01000] [unixODBC][D         


        
2条回答
  •  执笔经年
    2021-01-01 14:20

    First, you can use pymssql which doesn't require configuring unixODBC, which is the problem here.

    To configure unixODBC with FreeTDS, do the following: http://www.unixodbc.org/doc/FreeTDS.html

    There's a tool that comes with FreeTDS, tsql. Use it to test your connection string. It's a very bare bones tool and something of a pain. :-/

    Finally, there's a similar question with other problems in StackOverflow: How do I configure pyodbc to correctly accept strings from SQL Server using freeTDS and unixODBC?

提交回复
热议问题