On Thu, Aug 15, 2013 at 05:57:37PM -0700, Robert Ayrapetyan
<[email protected]> wrote:
> 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.
Thank you. I don't use MSSQL so I cannot test it. I will apply and
commit your code later.
Oleg.
--
Oleg Broytman http://phdru.name/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
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