connectors.append("UID=%s" % user)
connectors.append("PWD=%s" % keys.pop('password', ''))
else:
- connectors.append("TrustedConnection=Yes")
+ connectors.append("Trusted_Connection=Yes")
# if set to 'Yes', the ODBC layer will try to automagically convert
# textual data from your database encoding to your client encoding
* *mssql+pyodbc://mydsn* - connects using the specified DSN named ``mydsn``.
The connection string that is created will appear like::
- dsn=mydsn;TrustedConnection=Yes
+ dsn=mydsn;Trusted_Connection=Yes
* *mssql+pyodbc://user:pass@mydsn* - connects using the DSN named
``mydsn`` passing in the ``UID`` and ``PWD`` information. The
def test_pyodbc_connect_dsn_trusted(self):
u = url.make_url('mssql://mydsn')
connection = dialect.create_connect_args(u)
- eq_([['dsn=mydsn;TrustedConnection=Yes'], {}], connection)
+ eq_([['dsn=mydsn;Trusted_Connection=Yes'], {}], connection)
def test_pyodbc_connect_old_style_dsn_trusted(self):
u = url.make_url('mssql:///?dsn=mydsn')
connection = dialect.create_connect_args(u)
- eq_([['dsn=mydsn;TrustedConnection=Yes'], {}], connection)
+ eq_([['dsn=mydsn;Trusted_Connection=Yes'], {}], connection)
def test_pyodbc_connect_dsn_non_trusted(self):
u = url.make_url('mssql://username:password@mydsn')