Home » RDBMS Server » Server Administration » cursor
cursor [message #369766] Thu, 05 October 2000 22:14 Go to next message
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 Go to previous messageGo to next message
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 Go to previous message
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
Previous Topic: plsql
Next Topic: ora-12705 nls-parameter invalid,.. ?
Goto Forum:
  


Current Time: Fri May 17 01:05:43 CDT 2024