Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m working with web application. In my database, I want to update automatically updated based on that. I m creating library managent. There are an option for book reservation. If somebody not come for get the book long period. The table of the status is automatically changed to 'cancel'. And also a mail is automatically send to particualar students sometimes. In that case even the application is not running that process are automatically should have to be done. Which one is best solutions for that case. Triggers or anything else?
Thanks in advance..
Posted

You can write a windows service or Console Application which will do it for you. The application periodically(you will set the interval) update that table based on your logic. In console application you can run it with the help of Windows Task Scheduler. I prefer Console app(running with Windows task scheduler) over Windows service development only because it is easier to develop/maintain.
 
Share this answer
 
v2
Hi,

you can make use of SQL server Agent Jobs, which will allow you to execute certain sql statements regularly after every specified interval, in other terms, this will help to execute sql statements in the scheduled manner.

refer below MSDN article for more on SQL JOBS.
MSDN-Implement Jobs[^]
Manage Job Steps[^]

hope it helps.
 
Share this answer
 
v2
Comments
Ankur\m/ 20-Mar-13 3:20am    
Yes, SQL job is the way to go for his scenario.
Karthik Harve 20-Mar-13 5:37am    
Thanks Ankur.!!:-)
 
Share this answer
 
Hi,
You can make a scheduler whch will check for the reservation and run it from the server-scheduled tasks.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900