when using Windows authentification with domain name and connection string to SQL Server (using Python34 and pyodbc), I still receive the following error:
cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 11.0};SER
N04\SQLEXPRESS;DATABASE=BRKPNTD',UID='CZMKAJAN04\celocaladmin', PWD='xxxxxx')
pyodbc.Error: ('28000', "[28000] [Microsoft][SQL Server Native Client
Server]Login failed for user 'CZMKAJAN04\\celocaladmin'. (18456) (SQLDriverConnect)")
I don't know how to get rid of the double backslash, tried raw version of the string, various forms of escaping and nothing helped. Do you know how to solve it? Thanks a lot
cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 11.0};SER N04\SQLEXPRESS;DATABASE=BRKPNTD;UID=CZMKAJAN04\\celocaladmin;PWD=xxxxxx')would work better.