Posted: Fri Sep 14, 2007 5:23 am Post subject: Database - Read committed
Voyager
Joined: 05 Aug 2002 Posts: 79 Location: US
Hi,
I'm using MBv5 in my project and in my message flow, I use a common procedure that does a select from a table for a key and if not found inserts a record with the key value else updates the record. There can be more than one message flow calling the same procedure concurrently with the same key. The expected behaviour is, first flow inserts the record and the other flow updates the record. But currently, the first flow selects and finds no record and concurrently the second flow also does a select before the first flow inserts and commits the record. Hence the second flow also tries to insert the same record and throws an error. Could you please help me resolving this issues.
How would you solve this problem if you were writing stand alone programs, rather than message flows?
Really, I think the thing to do is handle the error gracefully, and assume someone else updated the record. _________________ I am *not* the model of the modern major general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum