From 3d917a4a24c02939805eeeb99c4eed569cc4a7c7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 11 Aug 2006 18:23:48 +0000 Subject: [PATCH] fixed ms-sql connect() to work with adodbapi --- CHANGES | 1 + lib/sqlalchemy/databases/mssql.py | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 34344d4eea..23f5031236 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,7 @@ return an array instead of string for SHOW CREATE TABLE call - fix to lazy loads when mapping to joins [changeset:1770] - all create()/drop() calls have a keyword argument of "connectable". "engine" is deprecated. +- fixed ms-sql connect() to work with adodbapi 0.2.6 - big overhaul to schema to allow truly composite primary and foreign diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 38699a8a52..690b718634 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -237,16 +237,12 @@ class MSSQLExecutionContext(default.DefaultExecutionContext): class MSSQLDialect(ansisql.ANSIDialect): def __init__(self, module = None, **params): self.module = module or dbmodule - self.opts = {} ansisql.ANSIDialect.__init__(self, **params) def create_connect_args(self, url): - self.opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port']) - self.opts.update(url.query) - return ([], self.opts) - - def connect_args(self): - return make_connect_string(self.opts) + opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port']) + opts.update(url.query) + return make_connect_string(opts) def create_execution_context(self): return MSSQLExecutionContext(self) -- 2.47.2