mssql schema is hardcoded to dbo

Issue #392 resolved
Janez Jere created an issue

Hi,

I cant find how to set schema, so I chaged a little mssql module.

it would be nice if code is modified to something like example bellow BTW, it would work with adodbapi, but pymssql would ignore the default schema.

==================== class MSSQLDialect(ansisql.ANSIDialect): def init(self, module=None, auto_identity_insert=False, params): self.module = module or dbmodule self.auto_identity_insert = auto_identity_insert ansisql.ANSIDialect.init(self, params) + self.schema_name = "dbo"

def get_default_schema_name(self):
    return  self.schema_name

def set_default_schema_name(self, schema_name):
    self.schema_name = schema_name

Comments (7)

  1. paj

    The fix causes an exception: File "build\bdist.win32\egg\sqlalchemy\databases\mssql.py", line 269, in init NameError: global name 'set_default_schema_name' is not defined

    Looks like a typo in the change; small patch attached.

  2. Log in to comment