My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 340 attachment: pyodbc_cancel.diff (643 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1923a1924,1939
> static const char* cancel_doc =
> "Cancels the currently executing query (if any) on this cursor.\n";
>
> static PyObject* Cursor_cancel(PyObject* self, PyObject* args)
> {
> Cursor* cur = Cursor_Validate(self, CURSOR_REQUIRE_OPEN | CURSOR_RAISE_ERROR);
> if (!cur)
> return 0;
> SQLRETURN ret = SQLCancel(cur->hstmt);
> if (!SQL_SUCCEEDED(ret))
> return RaiseErrorFromHandle("SQLCancel", cur->cnxn->hdbc, cur->hstmt);
>
> return (PyObject*)cur;
> }
>
>
2148a2165
> { "cancel", (PyCFunction) Cursor_cancel, METH_NOARGS, cancel_doc },
Powered by Google Project Hosting