Replies: 13 comments
-
Could you post an ODBC trace? |
Beta Was this translation helpful? Give feedback.
-
No trace from ODBC...i have attached the image for your reference. |
Beta Was this translation helpful? Give feedback.
-
That doesn't look like a crash but an exit. Did you try to create an ODBC trace? |
Beta Was this translation helpful? Give feedback.
-
Try running this VBScript and see if it works. (Save it as a .vbs file and then double-click it.) ' hfsql_test.vbs
connection_str = "Driver={HFSQL};Server Name = 127.0.0.1;Server Port =4900;Database = test;UID = Admin;IntegrityCheck=1"
Set cnxn = CreateObject("ADODB.Connection")
cnxn.Open connection_str
WScript.Echo "connected" |
Beta Was this translation helpful? Give feedback.
-
@v-chojas As i am new to pyodbc, could you please help me with the creation of ODBC trace? |
Beta Was this translation helpful? Give feedback.
-
@gordthompson Thank you. I tried and it's working. But i want it to be connected via pyodbc. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/mkleehammer/pyodbc/wiki/Troubleshooting-%E2%80%93-Generating-an-ODBC-trace-log |
Beta Was this translation helpful? Give feedback.
-
i have attached the odbc trace log for your reference. |
Beta Was this translation helpful? Give feedback.
-
You could try using pypyodbc instead of pyodbc to see if it works better. |
Beta Was this translation helpful? Give feedback.
-
@gordthompson Sure, will try. But i just want to know why it is not working via pyodbc? |
Beta Was this translation helpful? Give feedback.
-
This appears to be a driver bug since the last thing that happened was a call to SQLGetData which never returns. You can check the Application log in the Event Viewer to see if it was a silent crash. |
Beta Was this translation helpful? Give feedback.
-
The driver does seem to have an issue with SQLGetData getting called after SQLGetTypeInfo. This is the tail of the log file:
Earlier in the file there is the exact same sequence of calls. That SQLGetData call doesn't EXIT either. The program just proceeds with calling SQLSetEnvAttr, but it does not crash.
|
Beta Was this translation helpful? Give feedback.
-
I am experiencing the same issue. Is there anything I can do about it or do I have to pray for a fixed driver? |
Beta Was this translation helpful? Give feedback.
-
Please first make sure you have looked at:
Environment
To diagnose, we usually need to know the following, including version numbers. On Windows, be
sure to specify 32-bit Python or 64-bit:
Issue python crashes while connecting with HFSQL
Often it is easiest to describe your issue as "expected behavior" and "observed behavior".
Trying to connect hfsql using pyodbc, but after executing this pyodbc.connect(connstr) python crashes and rest of the code are not executing even try/execute is there
sample code:
import pyodbc
try:
pyodbc.connect('Driver={HFSQL};Server Name = 127.0.0.1;Server Port =4900;Database = test;UID = Admin;IntegrityCheck=1')
except Exception as ex:
print(ex)
Error : No error has thrown
Beta Was this translation helpful? Give feedback.
All reactions