Error when attempting to connect with Python via DSN to Synergy DBMS
I am trying to connect to a Synergy DBMS via a DSN on a Windows 7 machine. I have a 64-bit xfODBC driver provided by the company that manages the database I am connecting with. Also i have read only rights to the database. Here is my code:
def test_conn():
try:
cnxn = pyodbc.connect('DSN=MaBcon;Uid=myuid;Pwd=mypwd', readonly=True)
cursor = cnxn.cursor()
if cnxn.cursor():
print("Connection successful\n")
cnxn.close()
except pyodbc.Error as e:
print("Your query ran into this problem: {}".format(e))
test_conn()
When I attempted to connect i get an error:
(‘S1000’, “[S1000] [TOD][ODBC Driver]Synergy DBMS: Cannot open ‘path/to/database’ ,No privilege to this file or directory (-1) (SQLDriverConnect); [S1000] [Microsoft][ODBC Driver Manager] The driver doesn’t support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). (0)”)
This comes with some confusion as I have contacted the individual that manages the database and he assures me my DSN information is correct. I'm hoping their is some small detail I have missed that someone can point out to me here, but any help or suggestions would be very appreciated!