Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET SQL Server
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 19-Mar-13 21:20pm
devausha1.4K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v2
Comments
Ankur\m/ at 20-Mar-13 3:20am
   
Yes, SQL job is the way to go for his scenario.
Karthik Harve at 20-Mar-13 5:37am
   
Thanks Ankur.!!:-)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hi,
You can make a scheduler whch will check for the reservation and run it from the server-scheduled tasks.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 200
1 Kamal Rocks 184
2 PIEBALDconsult 150
3 BillWoodruff 148
4 Jochen Arndt 135
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100