Or put into technical terms: You are virtually starting a transaction the moment you determine the initial Quantity, from which you subtract the amount a user orders and compute lnQty, and that's a problem, because you don't yet technically start a transaction and lock that Quantity for concurrent users. You'd also not do that, if you just start a transaction, the table or record only get's a write lock once you write, other users will still read the Quantity value. So donm't compute update values with values you retrieve before you save your change of data. In the worst case that makes "concurrent" meaning all the minutes users need to put together their order, search items and put them into a shopping cart instead of meaning the few ms a save needs to update the current stock data to it's next state. See? You're artificially highering the need of lock times, turn your logic around to only need the few ms you really change data from it's current to the next state, that lowers the problems you may get with concurrent changes.
Bye, Olaf.