Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When an application has finished using a cursor, it calls SQLCloseCursor to close the cursor. For example:
SQLCloseCursor(hstmt);
Until the application closes the cursor, the statement on which the cursor is opened cannot be used for most other operations, such as executing another SQL statement. For a complete list of functions that can be called while a cursor is open, see Appendix B: ODBC State Transition Tables.
Note
To close a cursor, an application should call SQLCloseCursor, not SQLCancel.
Cursors remain open until they are explicitly closed, except when a transaction is committed or rolled back, in which case some data sources close the cursor. In particular, reaching the end of the result set, when SQLFetch returns SQL_NO_DATA, does not close a cursor. Even cursors on empty result sets (result sets created when a statement executed successfully but which returned no rows) must be explicitly closed.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Close a project in Dynamics 365 Business Central - Training
Do you want to discover what to do in Microsoft Dynamics 365 Business Central when the actual work for a project is completed? This module explains how to close a project in Business Central.