]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
update pyodbc/SQL server connection strings, [ticket:2217]
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Dec 2011 17:25:36 +0000 (12:25 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Dec 2011 17:25:36 +0000 (12:25 -0500)
lib/sqlalchemy/dialects/mssql/pyodbc.py

index 529cdac509cdc1cb6d963106c11b124abffd799a..b3572b57499495b763dbd62759c674495481232b 100644 (file)
@@ -35,27 +35,31 @@ Examples of pyodbc connection string URLs:
 
     dsn=mydsn;UID=user;PWD=pass;LANGUAGE=us_english
 
-* ``mssql+pyodbc://user:pass@host/db`` - connects using a connection string
-  dynamically created that would appear like::
+* ``mssql+pyodbc://user:pass@host/db`` - connects using a connection 
+  that would appear like::
 
     DRIVER={SQL Server};Server=host;Database=db;UID=user;PWD=pass
 
 * ``mssql+pyodbc://user:pass@host:123/db`` - connects using a connection
-  string that is dynamically created, which also includes the port
-  information using the comma syntax. If your connection string
-  requires the port information to be passed as a ``port`` keyword
-  see the next example. This will create the following connection
-  string::
+  string which includes the port
+  information using the comma syntax. This will create the following 
+  connection string::
 
     DRIVER={SQL Server};Server=host,123;Database=db;UID=user;PWD=pass
 
 * ``mssql+pyodbc://user:pass@host/db?port=123`` - connects using a connection
-  string that is dynamically created that includes the port
+  string that includes the port
   information as a separate ``port`` keyword. This will create the
   following connection string::
 
     DRIVER={SQL Server};Server=host;Database=db;UID=user;PWD=pass;port=123
 
+* ``mssql+pyodbc://user:pass@host/db?driver=MyDriver`` - connects using a connection
+  string that includes a custom
+  ODBC driver name.  This will create the following connection string::
+
+    DRIVER={MyDriver};Server=host;Database=db;UID=user;PWD=pass
+
 If you require a connection string that is outside the options
 presented above, use the ``odbc_connect`` keyword to pass in a
 urlencoded connection string. What gets passed in will be urldecoded