Subject | RE: [firebird-support] Use a row only once |
---|---|
Author | Chad Z. Hower |
Post date | 2004-11-24T03:32:50Z |
If it helps, basically what I need to do:
1) Find the first record in the table with an FK that has null.
2) Update that FK to point to a specified record in the foreign table.
The conflict would occur when two transactions perform #1 before the other
hits #2 as they will retrieve the same record in step 1. I realize that
likely the only way to detect this is try and catch the exception. I was
just soliciting possible other/better ideas.
The other problem is that I just simulated a similar situation, and at least
in the .net provider it comes back as a generic FB exeption. I have to see
if there is some way to detect this other than just looking at the exception
text.
1) Find the first record in the table with an FK that has null.
2) Update that FK to point to a specified record in the foreign table.
The conflict would occur when two transactions perform #1 before the other
hits #2 as they will retrieve the same record in step 1. I realize that
likely the only way to detect this is try and catch the exception. I was
just soliciting possible other/better ideas.
The other problem is that I just simulated a similar situation, and at least
in the .net provider it comes back as a generic FB exeption. I have to see
if there is some way to detect this other than just looking at the exception
text.