summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-02-25 00:37:12 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-02-25 00:37:12 +0000
commit9a5e2b04c8a3d42719690b62cb3b0e11d7cad56c (patch)
tree8567be97dec2e32e788c7e77598146fb67ab10b9
parent80281c8907ac7b01b2fa377cc75cb975c9a5c3b0 (diff)
parent2cd55d842f41d3f9f7b5dcf03c9c4a5e0a6be709 (diff)
downloadsqlalchemy-9a5e2b04c8a3d42719690b62cb3b0e11d7cad56c.tar.gz
Merge "mssql+pyodbc specify ampersand separator"
-rw-r--r--lib/sqlalchemy/dialects/mssql/pyodbc.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/pyodbc.py b/lib/sqlalchemy/dialects/mssql/pyodbc.py
index c94b50678..4c1e9e116 100644
--- a/lib/sqlalchemy/dialects/mssql/pyodbc.py
+++ b/lib/sqlalchemy/dialects/mssql/pyodbc.py
@@ -53,9 +53,18 @@ name must be URL encoded which means using plus signs for spaces::
Other keywords interpreted by the Pyodbc dialect to be passed to
``pyodbc.connect()`` in both the DSN and hostname cases include:
``odbc_autotranslate``, ``ansi``, ``unicode_results``, ``autocommit``,
-``authentication`` (e.g., ``authentication=ActiveDirectoryIntegrated``).
+``authentication``.
Note that in order for the dialect to recognize these keywords
(including the ``driver`` keyword above) they must be all lowercase.
+Multiple additional keyword arguments must be separated by an
+ampersand (``&``), not a semicolon:
+
+ engine = create_engine(
+ "mssql+pyodbc://scott:tiger@myhost:port/databasename"
+ "?driver=ODBC+Driver+17+for+SQL+Server"
+ "&authentication=ActiveDirectoryIntegrated"
+ )
+
Pass through exact Pyodbc string
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^