View previous topic :: View next topic
|
Author |
Message |
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
I have a batch program that uses a cursor. It fetches row depending upon a condition and updates the same with option CURRENT OF cursor.
Now my question is do I need to handle SQLCODE = 100 while updation ?
Is there any possibility that the row fetched by cursor is deleted by another user before it is updated? |
|
Back to top |
|
|
ragganga
New User
Joined: 22 Jan 2007 Posts: 18 Location: bangalore
|
|
|
|
Hi Parag,
It is better to code SQLCODE = 100 because as you told depending on condition it will fetch and do Updates....
Consider a situation, it won't satisfied condition then it is end of record
i.e SQLCODE = 100. so it is needed
For your second question.
When you open any Table, it won't allow any other user to do anything to that table, until your program end
Regards
Raghu |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
Quote: |
For your second question.
When you open any Table, it won't allow any other user to do anything to that table, until your program end |
I dont agree with the above sentence. It cant be said like that without considering the isolation levels. I would say it would depend on the isolation level. Its an interesting concept please go thru it. Thanks |
|
Back to top |
|
|
ragganga
New User
Joined: 22 Jan 2007 Posts: 18 Location: bangalore
|
|
|
|
hi vini,
Thanks for making a point in my mistake.
I forgot to write Isolation point.
Regards
Raghu |
|
Back to top |
|
|
|