Connecting to MS SQL Server with Windows Authentication using Python?
问题 How do I connect MS SQL Server using Windows Authentication, with the pyodbc library? I can connect via MS Access and SQL Server Management Studio, but cannot get a working connection ODBC string for Python. Here's what I've tried (also without 'Trusted_Connection=yes' ): pyodbc.connect('Trusted_Connection=yes', driver='{SQL Server}', server='[system_name]', database='[databasename]') pyodbc.connect('Trusted_Connection=yes', uid='me', driver='{SQL Server}', server='localhost', database='