hey there - can you try reverting your change and applying this patch instead ? i havent tested locally so it would be helpful if you can confirm it works....
Index: lib/sqlalchemy/databases/mssql.py =================================================================== --- lib/sqlalchemy/databases/mssql.py (revision 1775) +++ lib/sqlalchemy/databases/mssql.py (working copy) @@ -237,17 +237,13 @@ 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) + opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port']) + opts.update(url.query) + return make_connect_string(opts) - def connect_args(self): - return make_connect_string(self.opts) - def create_execution_context(self): return MSSQLExecutionContext(self) On Aug 11, 2006, at 5:43 AM, Thomas Handler wrote: > Michael, Rick, > > thank you for your answer. > > I use adodbapi, yes sorry for having not given this information. > > I debugged into and found that in the very beginning of mssql.py there > is a comment on a non-standard connections string of adodbapi. > So I tried to make a quick hack into default/engine.py and changed > some > lines as following: > > class PoolConnectionProvider(base.ConnectionProvider): > def __init__(self, dialect, url, poolclass=None, pool=None, > **kwargs): > (cargs, cparams) = dialect.create_connect_args(url) > if pool is None: > kwargs.setdefault('echo', False) > kwargs.setdefault('use_threadlocal',True) > if poolclass is None: > poolclass = sqlalchemy.pool.QueuePool > dbapi = dialect.dbapi() > if dbapi is None: > raise exceptions.InvalidRequestError("Cant get DBAPI > module for dialect '%s'" % dialect) > def connect(): > try: > # change goes here > return dbapi.connect(dialect.connect_args()[0][0]) > # removed return dbapi.connect(*cargs, **cparams) > except Exception, e: > raise exceptions.DBAPIError("Connection > failed", e) > self._pool = poolclass(connect, **kwargs) > else: > if isinstance(pool, sqlalchemy.pool.DBProxy): > self._pool = pool.get_pool(*cargs, **cparams) > else: > self._pool = pool > > This way it works for me. Sorry that my understanding of SQLAlchemy is > too poor at the moment to provide you a real fix... > > Regards, > Thomas > > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users