I have a SQL Server 2000 db as a backend to an ASP.Net application that I am working on. The db contains a table named RecordLocks which is part of a custom record locking scheme. Basically, when a user selects a record in the app it checks the table to make sure someone else isn't already using it; if all is okay then the app inserts a new record into the table. I am using this locking scheme instead of locking hints since the app immediately disconnects from the db after it retrieves data.
I am trying to figure out how I can check a datetime field in the RecordLock table to determine if more than a predetermined amount of time has passed by(the time comes from another table), and if so, delete it. I need to do this automatically every minute or so and need it all to be done in SQL Server. Is this possible?
Thanks in advance for any suggestions you can provide.
I am trying to figure out how I can check a datetime field in the RecordLock table to determine if more than a predetermined amount of time has passed by(the time comes from another table), and if so, delete it. I need to do this automatically every minute or so and need it all to be done in SQL Server. Is this possible?
Thanks in advance for any suggestions you can provide.