I'm trying to use Python to access our company's ERP data using a third party ODBC connection, but getting a strange error message.
I tried the spacing answer provided in this question with no luck, and I don't see how the other answers would help me.
The OEM of the ODBC has a short tutorial posted here, they recommend using the pyodbc package to use the ODBC connector. I've followed the ERP company's ODBC configuration documentation and was able to successfully test the connection from my PC:
Here's what the ODBC settings look like:
Following the tutorial (linked to above) I tried this simple script:
import pyodbc
conn = pyodbc.connect('DNS=PLEXODBC;UID=,<my_username>,PWD=<my_password>)
cursor = conn.cursor()
cursor.execute('''SELECT TOP 10 * FROM Part_v_Part''')
while True:
row = cursor.fetchone()
if not row:
break
print(row)
print('Done')
When I run this script I get the following error message:
pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
The error doesn't make sense to me because when I look at the admin tools I can see there is a name and driver that does exist:
I'm not sure what to try next or how to get this to work.
Can someone help me please? Thank you!