Dynamic CLOSE Cursor Statement
The dynamic CLOSE statement closes a dynamic cursor much like a static cursor, except that the prepared statement is not immediately discarded. Closing the cursor discards all pending rows for the request, but allows you to reopen the cursor without preparing the cursor SELECT associated with the cursor. This allows you to re-execute the cursor specification, possibly with new values for any parameter markers, without recompiling the request.
The request is finally dropped when you prepare another (possibly identical) request using the same statement identifier (or request handle), or a transaction commit or transaction rollback occurs. The preprocessor generates a call to
sqldynclose()
for this statement.Following is the syntax for the dynamic CLOSE statement:
cursor-name
A cursor name previously defined in a DECLARE CURSOR statement.
NOTE: The SQLDA is not automatically deallocated or cleared when the cursor is closed.For an example of the dynamic ESQL CLOSE statement, see Step 10 in the "Executing Dynamic Cursor Specifications" section in this chapter.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |