we are developing one gate pass application in one project. In this there is a requirement that when gate pass is entered for a person, if he comes 2 hours late, that record should be made read only. For this we are running an update query every 1 minute using sql job. This query is checking the start time of the gate pass and changing the state of that record to Late. Based on this we are checking in the UI, to make the record read only. But the query is not working properly i.e.. records are not becomming late. I thought this could be a problem of table locking and made all the update queries and insert queries based on the Gate pass table to include with Rowlock. Even then records are not updating properly. Do i need to include with Rowlock in select statements also. Or there is another way to do this.