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
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
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
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;'