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

What are db2 objects?

807


What is catalog database in db2?

844


How do you concatenate the firstname and lastname from emp table to give a complete name?

786


What is sqlca’s maximum length?

872


Define buffer pool.

789


How does a cursor work?

732


What is the role of schema in the db2 database?

888


Name the various locking levels available?

816


What is precompiler in db2?

755


What is host variable in db2 cobol?

789


Define sqlca.

834


What is dbrm library?

768


What is a system catalog table in db2?

800


What does db2 stand for?

755


Explain about rct in db2?

852