]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Corrected problem with a Trusted Connection under MSSQL 2008 native driver.
authorMichael Trier <mtrier@gmail.com>
Mon, 5 Oct 2009 02:38:39 +0000 (02:38 +0000)
committerMichael Trier <mtrier@gmail.com>
Mon, 5 Oct 2009 02:38:39 +0000 (02:38 +0000)
lib/sqlalchemy/connectors/pyodbc.py
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/test_mssql.py

index 4f8d6d517f7751f181fa4a4d6c9f2117662d2961..ebe28c6829c52cbd25da98e27869ab603e661019 100644 (file)
@@ -48,7 +48,7 @@ class PyODBCConnector(Connector):
                 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 
index 9964a28436938f0478e5b0fae420415f7f670fae..76846b6b437b0fb9278cd672d8899f56795b51a4 100644 (file)
@@ -42,7 +42,7 @@ Examples of pyodbc connection string URLs:
 * *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
index ddb57c5b924385005c9bea0efcf3de70524c82cf..68f3816a5657c3b6d4cc07b98ff7b737550971b2 100644 (file)
@@ -623,12 +623,12 @@ class ParseConnectTest(TestBase, AssertsCompiledSQL):
     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')