From b74d8f28efe5ee35064fd30d2ea0241bb5599878 Mon Sep 17 00:00:00 2001 From: David Zidar <381720+DavidZidar@users.noreply.github.com> Date: Wed, 12 May 2021 01:58:51 +0200 Subject: [PATCH] Fix MS SQL connection string examples (#17801) pyodbc parameters passed via a connection string to sqlalchemy should be passed as query string parameters and must be lower case. sqlalchemy includes the following note in their source code: 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:: https://github.com/sqlalchemy/sqlalchemy/blob/13d01a03c55890e19f5721405f6e5fb45d37cac4/lib/sqlalchemy/dialects/mssql/pyodbc.py#L56-L59 --- source/_integrations/recorder.markdown | 4 ++-- source/_integrations/sql.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 49dc1f0f059..97ce6591b59 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -241,7 +241,7 @@ The following database engines are tested when major changes are made to the rec | PostgreSQL | `postgresql://user:password@SERVER_IP/DB_NAME` | | PostgreSQL (Socket) | `postgresql://@/DB_NAME` | | PostgreSQL (Custom socket dir) | `postgresql://@/DB_NAME?host=/path/to/dir` | -| MS SQL Server | `mssql+pyodbc://username:password@SERVER_IP/DB_NAME?charset=utf8;DRIVER={DRIVER};Port=1433;` | +| MS SQL Server | `mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=DRIVER` |