I am receiving a very common error while trying to connect Microsoft SQL Server using pyodbc. I've tried the solutions suggested here before, but none of them solved my problem.
import pyodbc
conn = pyodbc.connect('Driver={SQL Server};'
'Server= server_name;'
'Database= database_name;'
'UID= user_id;'
'PWD= password;')
InterfaceError: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]
Login failed for user ' '. (18456) (SQLDriverConnect); [28000] [Microsoft][ODBC SQL Server Driver]
[SQL Server]Login failed for user ' '. (18456)")
When I connect the database via Microsoft SQL Server Management Studio 18 app, below is how I connect. I copy and paste server name, login, and password information to my Python code as shown above. My OS is Windows 10. When I call select @@version, I get Microsoft SQL Server 2014 (SP3-GDR) (KB4583463)...
