Bug #72311 SQLCloseCursor Does Not Return Correct Error
| Submitted: | 10 Apr 2014 19:25 | Modified: | 20 Mar 2025 16:49 |
|---|---|---|---|
| Reporter: | Lawrenty Novitsky | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
| Version: | 5.3.2 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[10 Apr 2014 19:25]
Lawrenty Novitsky
[25 Feb 2025 8:26]
Rafal Somla
Posted by developer: We think the expected behavior of SQLCloseCursor() should be this: 1. If no cursor is open for the statement then report error 24000 (Invalid cursor state) and do nothing more. 2. Otherwise do the same thing as SQLFreeStmt(SQL_CLOSE), which should either succeed or report relevant error.
[17 Mar 2025 3:58]
Bogdan Degtyariov
Posted by developer: The fix for the problem is as follows: SQLCloseCursor() function returns errors each time it is called when no result set is available for the statement. It gives SQL State: 24000 and error message: Invalid cursor state. The patch has been pushed into the source tree.
[20 Mar 2025 16:49]
Daniel So
Posted by developer: Added the following entry to the C/ODBC 9.3.0 changelog: "If the SQLCloseCursor() method was called when no result set was available, no error was returned. With this patch, the method returned SQL State: 24000 and error message Invalid cursor state in the situation."
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.