pyodbc icon indicating copy to clipboard operation
pyodbc copied to clipboard

Expose the native handles (HENV, HDBC, HSTMT...)

Open adrian-constantin opened this issue 8 months ago • 0 comments

Hello @mkleehammer

Can you please expose the native SQL handles used by pyodbc ?

(similar to how Qt (PySide6) exposes the native HWND as the result of winId() method or effectiveWinId())

For example I would like to know which drivers support SQLBrowseConnect(), which is normally listed in the output of SQLDrivers(), but it so happens that pyodbc does not expose this information when I call pyodbc.drivers().

If I can get the HENV handle from pyodbc, I could still use ctypes module and call the native SQLDrivers() function myself. Without the handle exposed by pyodbc, I have to create a second environment (HENV) for that ...

Thank you, Adrian Vasile Constantin

adrian-constantin avatar Mar 08 '25 20:03 adrian-constantin