cursor [message #369766] |
Thu, 05 October 2000 22:14 |
RS
Messages: 5 Registered: August 2000
|
Junior Member |
|
|
I would like to know why a commit should not be used inside a cursor loop.In such a case what can I do for inserting 1000's of records without a commit inside the loop so that atleast some of the inserts or updates within a cursor loop is successful even in cases of fatal problems.
Will using a savepoint help me in that and if so how
Thanks
|
|
|
Re: cursor [message #369769 is a reply to message #369766] |
Fri, 06 October 2000 04:10 |
John R
Messages: 156 Registered: March 2000
|
Senior Member |
|
|
Whether you should usa a commit depends on what sort of cursor you have opened.
If you have opened the cursor For Update, then doing a commit inside the loop causes you to loose all the locks that the cursor established.
If the cursor is a normal cursor, then there are no problems with using a commit inside a loop.
|
|
|
Re: cursor [message #370140 is a reply to message #369766] |
Wed, 20 December 2000 06:28 |
Kannan
Messages: 29 Registered: September 2000
|
Junior Member |
|
|
u cannot use commit inside a cursor becomes it
releases the lock and it will give u a error
|
|
|