wht happens if we close cursor with cursor with hold option?
Answers were Sorted based on User's Feedback
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 ? | 23 Yes | 2 No |
Answer / 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 |
Answer / yuvaevergreen
A held cursor can be closed when
1.CLOSE cursor is issued.
2.ROLLBACK is issued.
3.Application terminates.
Is This Answer Correct ? | 5 Yes | 2 No |
what are the bind parameters?
Is it possible to precompile if db2 goes down?
What is a lock?
In cobol+DB2program if the code of cobol program has changed than i have to do precompilation once again?
What is an asychronous write?
could you give me an example how, where i code CHECKPOINT and restart...I need and example....thanks..
List down the types of triggers in the db2 database?
what is datacom db?
What is Skeleton cursor table (SKCT)?
What is IMAGECOPY ?
How is a typical db2 batch pgm executed?
COBOL PRECOMPILER ERROR: "XXXXXX" (TABLE) PREVIOUSLY DECLARED OR REFERENCED DCLGEN VARIABLES GETS IMPORTED TWICE FOR ONLY ONE EXEC SQL STATEMENT. WHAT COULD BE THE PROBLEM?