on-internet
← Community

Connect to SQL Server instance using pymssql

Stack Overflow ·

I'm attempting to connect to a SQL Server instance from a Windows box using pymssql (version 2.0.0b1-dev-20111019 with Python 2.7.1). I've tried the most basic approach from the console: import pymssql c = pymssql.connect(host = r'servername\instance', user = 'username', password = 'userpassword') In response to this, I get the very helpful error: InterfaceError: Connection to the database failed for an unknown reason. I am reasonably confident that the connection information is correct, as it works when I use adodbapi, with the following commands: import adodbapi c = adodbapi.connect(r'Provid

Comments

Sign in or sign up to comment and upvote.

No comments yet.