Re: pyodbc connect string

2014-04-29 Thread Larry Martell
On Tue, Apr 29, 2014 at 7:14 PM, Ben Finney wrote: > Larry Martell writes: > >> I am having a problem building a connect string for pyodbc. It works >> when everything is hard coded, but if I build the connect string it >> fails. >> >> This works: >> >> pyodbc.connect('DRIVER=FreeTDS;' 'SERVER=xx

Re: pyodbc connect string

2014-04-29 Thread Larry Martell
On Tue, Apr 29, 2014 at 7:09 PM, Chris Angelico wrote: > On Wed, Apr 30, 2014 at 10:57 AM, Larry Martell > wrote: >> This works: >> >> pyodbc.connect('DRIVER=FreeTDS;' 'SERVER=xx.xx.xx.xx;' 'PORT=1433;' >> 'DATABASE=blah;' 'UID=foo;' 'PWD=bar;') >> >> But this does not: >> >> pyodbc.connect(conn

Re: pyodbc connect string

2014-04-29 Thread Ben Finney
Larry Martell writes: > I am having a problem building a connect string for pyodbc. It works > when everything is hard coded, but if I build the connect string it > fails. > > This works: > > pyodbc.connect('DRIVER=FreeTDS;' 'SERVER=xx.xx.xx.xx;' 'PORT=1433;' > 'DATABASE=blah;' 'UID=foo;' 'PWD=ba

Re: pyodbc connect string

2014-04-29 Thread Chris Angelico
On Wed, Apr 30, 2014 at 10:57 AM, Larry Martell wrote: > This works: > > pyodbc.connect('DRIVER=FreeTDS;' 'SERVER=xx.xx.xx.xx;' 'PORT=1433;' > 'DATABASE=blah;' 'UID=foo;' 'PWD=bar;') > > But this does not: > > pyodbc.connect(conn_str) > > conn_str is constructed with: > > conn_str = "'DRIVER=%s;'