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

前端 未结 2 1098
攒了一身酷
攒了一身酷 2021-01-01 13:59

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:03

    Check your /etc/odbcinst.ini or it could be under /etc/unixODBC/odbcinst.ini

    In your connection string you have something like this "DRIVER=FreeTDS" there needs to be an entry in that file like the following. You may need to change your driver location.

    [FreeTDS]
    Description             = FreeTDS unixODBC Driver
    Driver          = /usr/lib64/libtdsodbc.so.0
    Setup           = /usr/lib64/libtdsodbc.so.0
    UsageCount              = 1
    

提交回复
热议问题