Where is FreeTDS installed when I download pymssql on windows?

筅森魡賤 提交于 2019-12-10 10:37:29

问题


I am having trouble connecting pymssql to my local instance of MSSQL, and would like to use the tsql debugging command that is included with FreeTDS. However, I am unable to find where it FreeTDS is installed. As far as I know, it comes pre-compiled with pymssql on windows, I just don't know where it is.

More info:

  • I am using windows
  • I am not using a virtual environment
  • I used the package manager included with PyCharm to install pymssql (I assume it wraps pip)

回答1:


AKAIK, pymssql for Windows doesn't come bundled with FreeTDS. If anything, IIRC, it uses the Windows SQL Server driver. To use FreeTDS instead, you'd have to download and install it:

http://sourceforge.net/projects/freetdswindows/

By default, the latest version will install to c:\freetds-0.95rc2

Please see my above comment as well. I'll amend this answer if necessary with more information. Good luck!

UPDATE:

You can connect to SQL Server if you're on Windows using the native drive through pyodbc like this:

DRIVER={SQL Server};SERVER=yourserver;PORT=1433;DATABASE=yourdb;UID=dbuser;PWD=dbpassword

You may have better luck with that if the FreeTDS installation doesn't work for you.



来源:https://stackoverflow.com/questions/31350956/where-is-freetds-installed-when-i-download-pymssql-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!