Re: python-sybase + FreeTDS + MS SQL Server
Kevin Jacobs <[email protected]> Mon, 02 Aug 2004 18:07:28 -0400
| Newsgroups | gmane.comp.python.sybase |
|---|---|
| Message-ID | <[email protected]> |
Charles Bearden wrote: >My question is how to supply authentication credentials to the MS SQL >Server. I have to use a domain login userid like DOMAIN\username. When >I create a Python script like this: > >------------------------------------------------------------ >import Sybase > >dsn = 'theDb' >uid = 'MYDOMAIN\jrandomuser' >pwd = 'h4x0r' >cx = Sybase.connect(dsn, uid, pwd) > >cx.close() >------------------------------------------------------------ > > > Try: uid = 'MYDOMAIN\\jrandomuser' Don't forget Python's string quoting rules! ;) -Kevin