wht happens if we close cursor with cursor with hold option?

Answer Posted / rohit mishra

Once u issued a close cursor statement , it will get closed.
You can not access it after that until u open it again.
In that case your procedure will exit with an error message
like
"SQL0501N The cursor specified in a FETCH or CLOSE
statement is not open. SQLSTATE=24501"

With hold option doesn't make any difference in this case.


But if you are doing a commint operation in between your
transactions then a cursor declared with 'with hold' option
will not get closed.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are view updateable?

627


Define sqlca.

647


Define db2.

670


Explain about rct in db2?

635


What are union and union all?

537






What is explain in db2?

582


How do I connect my db2 database to ibm?

600


What is the information associated with sysibm.syslinks table?

657


What is the latest version of ibm db2?

735


What are bind parameters in db2?

611


How to execute stored procedure in db2 command editor?

528


i want to maintain uniqueness on pdf without make lf??????????

1632


Give the name of some fields form sqlca.

611


What is db2 purescale?

545


Is schema the same as database?

627