odbc

sqlalchemy + pyodbc how to trust certificate?

sqlalchemy + pyodbc how to trust certificate? Question: I have a python script using pyodbc that connects to a remote server with sql server running on it. I have a package I wrote with functions using sqlalchemy that I was able to use on one of my computers. I connected with this string: driver = …

Total answers: 2

pyodbc operational error 08001 ssl security error

pyodbc operational error 08001 ssl security error Question: I am trying to connect to my database on MS SQL Server 2016 using pyodbc via the below python script from my laptop (on Windows 10) and planning to have the code deployed in a Linux RHEL 6.4 server. conn=pyodbc.connect(‘Driver={SQL Server};’ ‘Server=DB_Instance;’ ‘Database=DB_Name;’ ‘UID=user_name;’ ‘PWD=password;’ ‘Trusted_Connection=no;’); At …

Total answers: 2

Connection to the UCCX Database (Informix) via Python

Connection to the UCCX Database (Informix) via Python Question: I’d like to pull out data from the Cisco UCCX database (Informix) with a Python script. After installing the Informix Client SDK and pyodbc as described in this guide, I run the following connection: pyodbc.connect(‘SERVICE=1504;PROTOCOL=onsoctcp;CLIENT_LOCALE=en_US.UTF8;DB_LOCALE=en_US.UTF8;DRIVER={IBM INFORMIX ODBC DRIVER (64-bit)};UID=uccxhruser;PWD=my_pwd;DATABASE=db_cra;HOST=my-uccx;SERVER=my-uccx_uccx’) But I get the following error: Error: …

Total answers: 1

Is it possible for 64-bit pyodbc to talk to 32-bit MS access database?

Is it possible for 64-bit pyodbc to talk to 32-bit MS access database? Question: I am using 64-bit python anaconda v4.4 which runs python v3. I have MS Access 2016 32-bit version. I would like to use pyodbc to get python to talk to Access. Is it possible to use 64-bit pyodbc to talk to …

Total answers: 4

how to catch specific pyodbc error message

how to catch specific pyodbc error message Question: I trid the following code, import pyodbc try: pyodbc.connect(‘DRIVER={%s};SERVER=%s;DATABASE=%s;UID=%s;PWD=%s’ % (driver, server, database, uid, password)) except pyodbc.Error, err: logging.warn(err) The error message format i get is (‘HY000’, “[HY000] [MySQL][ODBC 5.1 Driver]Access denied for user ‘root’@’192.168.2.27’ (using password: YES) (1045) (SQLDriverConnect)”) I want to receive just the message …

Total answers: 6

Pyodbc: Unable to update table on database (no error)

Pyodbc: Unable to update table on database (no error) Question: I have: import pyodbc con_str = "DRIVER={%s};SERVER=%s;UID=%s;PWD=%s;DATABASE=%s" % (‘FreeTDS’,’192.168.1.22′,’myuser’,’mypass’,’mydb’) con = pyodbc.connect(con_str) cur = con.cursor() cur.execute("update mytable set name=’abcd’") con.commit() con.close() The code executes and exits without any error ! But the database remains unchanged – nothing happened. Asked By: Yugal Jindle || Source Answers: …

Total answers: 1