summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql/adodbapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql/adodbapi.py')
-rw-r--r--lib/sqlalchemy/dialects/mssql/adodbapi.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/adodbapi.py b/lib/sqlalchemy/dialects/mssql/adodbapi.py
index 60fa25d34..a85ce5a57 100644
--- a/lib/sqlalchemy/dialects/mssql/adodbapi.py
+++ b/lib/sqlalchemy/dialects/mssql/adodbapi.py
@@ -56,7 +56,14 @@ class MSDialect_adodbapi(MSDialect):
)
def create_connect_args(self, url):
- keys = url.query
+ def check_quote(token):
+ if ";" in str(token):
+ token = "'%s'" % token
+ return token
+
+ keys = dict(
+ (k, check_quote(v)) for k, v in url.query.items()
+ )
connectors = ["Provider=SQLOLEDB"]
if 'port' in keys: