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 |
How can you count the number of rows from a table tab?
What is query_cache_limit?
Can you define an Index if the table size less than 10 PAGES?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
What is the use of DELGEN in DB2? Can we Write the program with out using it?
why we create view.
What is dbrm?
Is it Possible to read from PS file and write it to database by using dynamic sql(execute immediate)
if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)
What does DSNDB07 database do?
What can the SET option of the Repair Utility accomplish?
When is the authorization check on DB2 objects done - at BIND time or run time?