Hello.
There is a code in sqlobject/mssql/mssqlconnection.py:
else: # pymssql
self.dbconnection = sqlmodule.connect
sqlmodule.Binary = lambda st: str(st)
# don't know whether pymssql uses unicode
self.usingUnicodeStrings = False
self.make_conn_str = lambda keys: \
["", keys.user, keys.password, keys.host, keys.db]
However, pymssql.connect declaration is following:
def connect(server='.', user='', password='', database='', timeout=0,
login_timeout=60, charset=None, as_dict=False,
host='', appname=None, port='1433')
So seems make_conn_str produces wrong set of params which throws:
pymssql.InterfaceError: Connection to the database failed for an unknown
reason.
(because actual host value is empty).
I've updated it like that:
self.make_conn_str = lambda keys: \
[".", keys.user, keys.password, keys.db, 0, 60,
None, False, keys.host, None, keys.port]
and things started to work.
Thanks.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss