Not getting own emails and replies (all mailing list settings are set by default, however I found a reply in a mail archive here: http://sourceforge.net/mailarchive/forum.php?forum_name=sqlobject-discuss&max_rows=25&style=nested&viewmonth=201308).
Anyway, instead of [".", keys.user, keys.password, keys.db, 0, 60, None, False, keys.host, None, keys.port] for def connect(server='.', user='', password='', database='', timeout=0, login_timeout=60, charset=None, as_dict=False, host='', appname=None, port='1433') (which works fine for me) it would be better to pass only user, password, database, host and port (if set explicitly) (leaving default vals for other params). I'm not a python guru and have no idea how to implement this via dynamically generated list of params (similarly to how it was). On Thu Aug 15 17:57:37 2013, Robert Ayrapetyan wrote: > 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 sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss