![]() |
| Connection with SQL Server - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Connection with SQL Server (/thread-15677.html) |
Connection with SQL Server - DionisiO - Jan-27-2019 Hello all! I'm trying to connect to SQL Server, but i keep getting the message: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)'. I'm using Pycharm, and i also made sure i installed pyodbc and pypyodbc. Any Suggestiongs? Here is my code: import pyodbc class DBConn: conn = pyodbc.connect("Trusted_Connection='yes';" "driver='SQL Server}';" "server='my Server';" "database='QUERYTRAINING") if conn: print("We are connected") conn.close() |