Knowledgebase
[QODBC-ALL] Troubleshooting - Error: HY000, The Driver did not supply an error - Python
Posted by Rajendra Dewani (QODBC Support) on 22 February 2022 08:47 AM

Troubleshooting - [QODBC-ALL] - Troubleshooting - Error: HY000, The Driver did not supply an error - Python 

Problem Description

I tried to connect to QODBC using Python, but it gave me the following error.
Error: HY000, The driver did not supply an error! 

The Python code I am using is this. 

 

import pyodbc 

cn = pyodbc.connect('DSN=QuickBooks Data 64-Bit QRemote;')
cursor = cn.cursor()
cursor.execute("SELECT Top 10 Name FROM Customer")

for row in cursor.fetchall():
    print (row)

cursor.close()

cn.close() 

 

Solutions

Please try adding a parameter, i.e., "autocommit=True."

import pyodbc 

# pyodbc.pooling = False
cn = pyodbc.connect('DSN=QuickBooks Data 64-Bit QRemote',autocommit=True)
cursor = cn.cursor()
cursor.execute("SELECT Top 10 Name FROM Customer")

for row in cursor.fetchall():
    print (row)

cursor.close()

cn.close() 

 

(2 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).