mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.89k stars 562 forks source link

Interrupt a log running query #1067

Closed smitavk closed 2 years ago

smitavk commented 2 years ago

Environment

Issue

I am using Pyodbc to connect to a SQL server and I want to interrupt the current running query. from sql server documentation sql server provide functionality of SQLCancel:
SQLCancel: Any call to the function that returns SQL_STILL_EXECUTING, an application can call SQLCancel to cancel the function. If the cancel request is successful, the driver returns SQL_SUCCESS. This message does not indicate that the function was actually canceled; it indicates that the cancel request was processed.

So In pyodbc do we have such functionality If yes then kindly provide some document so that we can add this functionality in our application

Thanks in advance

v-chojas commented 2 years ago

pyODBC doesn't use ODBC in async mode, hence the answer is no.

smitavk commented 2 years ago

Thank you for quick reply