0

I am a little confused about the pyodbc syntax. Basically I want to create a couple of functions to generate different strings configured for different authentication types; for pushing into pyodbc.

Here is a sample connect dialogue, and as you can see, I want to support Windows Authentication and SQL Server Authentication:

Connect to Server dialogue

How do I programmatically generate these connection strings?

stackoverflowuser95
  • 1,992
  • 3
  • 20
  • 30
  • I should note that I am not sure how to find my SID and other connection details for SQL server; and that there will always be an active connection to SQL server via MS Access. – stackoverflowuser95 May 13 '13 at 04:56

1 Answers1

0

The connectionstrings.com page at

http://connectionstrings.com/sql-server-2008#sql-server-native-client-10-0-odbc-driver

lists several ODBC connection strings to accommodate the various options you might want to use. As for your comment...

I am not sure how to find my SID and other connection details for SQL server

...I'm not really sure what you intend to do, but knowing the SQL Server SID of any given user is unlikely to help you actually get connected to a SQL Server instance.

(It's also not terribly clear what Access has got to do with any of this....)

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
  • 1
    Thanks, I found the answer to my other question on http://stackoverflow.com/q/16515420. Will investigate generation of the other strings in a bit. – stackoverflowuser95 May 13 '13 at 09:42