Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can this be done using DTS?

Status
Not open for further replies.

KDavie

Programmer
Feb 10, 2004
441
US
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.



 
Would be better if you had a stored procedure that handled the SQL portion. Create a job that runs every minute and executes the Proc.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Thanks for the reply... I forgot I posted this thread, but I already solved the problem doing basically what you suggested. I used a scheduled task to run a stored proc..

-Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top