I'm trying to connect to Sage Line 50 ODBC (uk). This works fine if I use Python 2.7 when I change over to 3.7 it will not work bringing up the following error.
pyodbc.OperationalError: ('08001', "[08001] Cannot find all files in data path (0) (SQLDriverConnect); [08001] The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 24.2 (444); [08001] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). (0)")
Here is the code which works on 2.7 and fails on 3.7
username= "username"
password= "password"
driver = "{Sage Line 50 v24}"
DSN = "SageLine50v24_64"
self.conn = pyodbc.connect(DRIVER=driver, DSN=DSN, UID=username, PSW=password)
self.cursor = self.conn.cursor()
print ('Connected to SAGE')
I've even used 32 and 64bit versions of Python 3 with no success. I'm at a complete loss as to why it doesn't work. Is there a config in pyodbc I'm missing?