Recently I'm trying to connect to a SQL Server though pyodbc but I'm having some troubles with the connection string. I already tried as suggested on this previous question: Pyodbc error Data source name not found and no default driver specified paradox, creating a .dsn file and trying to implement the procedure's output on the string, but stil get the same error message: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')
This is what I'm doing so far:
conn = pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};
'WSID={BRRIO-xxxx};'
'APP={Microsoft® Windows® Operating System};'
'Trusted_Connection=Yes;'
'SERVER=BRRIO-xxxx\xxx;'
'Database=xxx_Data;'
'UID="xxxx";'
'PWD="xxxx";'
)
and this is what my .dsn file looks like:
DRIVER={ODBC Driver 13 for SQL Server};
WSID={BRRIO-xxxx};
APP={Microsoft® Windows® Operating System};
Trusted_Connection=Yes;
SERVER=BRRIO-xxxx\xxx
Any help is really appreciated!