From: Ivan P. <iva...@se...> - 2007-01-30 20:14:00
|
Sean, >> >> Statement failed, SQLCODE = -901 >> >> cannot update erased record ... > - The message is completely valid, and expected when using READ > COMMITTED. Can you describe, in your words, what message this error tries to tell to the user ? I will try first: Situation 1) If I do DELETE FROM TAB WHERE ID=1; and the record is there, it is successfully deleted. Situation 2) If I do DELETE FROM TAB WHERE ID=1; but somebody else did the same (and committed) just fraction of second before me, my command still returns o.k. (with rows affected=0) Situation 3) If I do DELETE FROM TAB WHERE ID=1; and somebody else did the same "at the same time but a bit sooner than me", then I can get error "erased record" with the meaning "Oh dear, you NEARLY deleted that record, but somebody else was faster. Sorry." Do you have some example of situation when it is important to distinguish case 2 and 3 ? > - The message should not be "eaten"/ignored -- the message may not > matter to you, but it could matter to someone. If you don't want to see > the error, then modify your triggers to handle the SQL errors codes. It was my original intention to just handle that error, but as you can read in my other post, this error does not have its own ErrorCode, so it can't be easily/reliably distinguished from other errors. Ivan |