BEGIN TRAN SELECT * FROM NEXTID WITH (HOLDLOCK, ROWLOCK) WHERE Cdbfname = 'JOBNO' mjobno=sqlResults.iNextNo UPDATE NEXTID SET iNextNo=InextNo+1 FROM NEXTID WITH (HOLDLOCK, ROWLOCK) WHERE Cdbfname = 'JOBNO' /* Do all your stuff here while the record is locked */ COMMIT TRANBasically I want one user to go through this code at a time, I thought the begin tran would