View previous topic :: View next topic
|
Author |
Message |
Amb
New User
Joined: 12 Mar 2010 Posts: 64 Location: India
|
|
|
|
Recently I faced the below question..
If we donot code the 'CLOSE CURSOR' statement then when the program finishes successfully it will automatically close the cursor and release all reources held by it.
Question 1: If I open this cursor again in another program will there be any error code? If yes what error code?
Question 2: If the program terminates unsuccessfully, will the cursor still get closed?
Question 3: If the cursor is declared with 'HOLD' option, will the program will still be able to close it?
I donot have access to DB2 so I am not able to try this out.. Can any pls reply? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
If you do not have access to DB2 then why are you asking in the expert forum and not in the student forum?
If by 'the program' , you mean the "main-program"
the answers : No, Yes, yes
If 'the program' is a subroutine, the premises is wrong. |
|
Back to top |
|
|
Amb
New User
Joined: 12 Mar 2010 Posts: 64 Location: India
|
|
|
|
Thanks |
|
Back to top |
|
|
|