Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Jazz home  >  Papers & Training

IMAGE/SQL: Issues and answers concerning SQL tables

» 

Jazz home

»

Software

»

Papers & Training

»

Java

»

HP Partners

»

News & Events

»

Register for more info

Content starts here
Prev Page Next Page Manual Top Home Page


5.47 What is keep cursor?



Key points


  • As was described previously, isolation levels can be used to release S locks prior to the end of the transaction. But by default, X locks are retained until the end of the transaction. If you want to release X locks before the transaction terminates use the KEEP CURSOR clause.

  • The OPEN statement is used to open appropriate scans to access rows in the active set, and to position the cursor before the first row that should be fetched. The OPEN statement has an optional KEEP CURSOR clause that affects the cursor's behavior when a COMMIT WORK or a ROLLBACK WORK statement is issued.

  • If you open a cursor without using the KEEP CURSOR clause, and you issue a COMMIT WORK or a ROLLBACK WORK statement without explicitly closing the cursor (you have not issued a CLOSE statement), ALLBASE/SQL will automatically close the cursor when the transaction ends. ALLBASE/SQL will also automatically close the cursor when a ROLLBACK WORK TO SAVEPOINT statement is issued.

    • Issuing explicit CLOSE statements is good programming practice, even though ALLBASE/SQL does not explicitly require them under these circumstances.


Prev Page Next Page Manual Top Home Page

Page last updated on November 29, 1995

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.