Sep-25-2017, 03:50 PM
I am new to python (ex VBA programmer). I get the error message when trying to connect
[MICROSOFT ODBC DRIVER] Data source name not found and no defualt driver specified.
i am using the following code.
sconnect = "Provider=SQLNCLI10; Server=uk171768; Database=PYTHON1; Trusted_Connection=YES;"
any ideaS?
[MICROSOFT ODBC DRIVER] Data source name not found and no defualt driver specified.
i am using the following code.
import pyodbc con = pyodbc.connect("Driver{ODBC Driver 10 for SQL Server};" "Server=UK171768;" "Database=PYTHON1;" "Trusted_Connection=yes;") cur=con.cursor() cur.execute('SELECT * FROM dbo.tbl_Customers')in VBA i can connect using:
sconnect = "Provider=SQLNCLI10; Server=uk171768; Database=PYTHON1; Trusted_Connection=YES;"
any ideaS?