>If this is really the problem, I have no solution except for to change this strategy. There is rarely a use for explicit locking in the first place, and VERY rarely a use for locking two records at a time. Seems this is a good candidate for transactions, instead of explicit record locking.
Agreed. And he did not give the details of his scenario so it's hard to tell exactly what was happening to him. It would help if he gave more details. Since he used the term "deadly embrace", I just tried to outline a typical strategy to work around the problem. I've never had a situation where I could create this exact type of situation except possible when updating multiple tables at a shot and like you I generally use a transaction to avoid this type of problem.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.