Commit issued without hold and without close cursor statemen



IBM's flagship relational database management system

Commit issued without hold and without close cursor statemen

Postby ravi11081992 » Sat Jan 22, 2022 2:42 pm

Hi,

If I use 'cursor without hold' and
after fetching all the records if I issue commit without having a 'Close cursor' statement

Will it be an issue opening the cursor again when I run the program again

Please let me know

Thanks
ravi11081992
 
Posts: 19
Joined: Mon Apr 30, 2018 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Commit issued without hold and without close cursor stat

Postby prino » Tue Jan 25, 2022 2:47 am

Why the flipping 'ell don't you try with a test program?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: Commit issued without hold and without close cursor stat

Postby engh » Tue Sep 20, 2022 6:07 pm

in case the answer is still awaited : yes, closing the cursor like committing the transaction causes the cursor pointer to be lost.
There is therefore no other solution than to specify "with hold" to avoid this inconvenience.
engh
 
Posts: 8
Joined: Fri Jul 08, 2022 7:29 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post