to execute SQL queries after a specific time interval
-
hi i am designing a web site in which i want to execute different ACCESS queries after a specific time interval ex:- 5 SECONDS. I am using ASP.net with C# and access as database. Thanks in advance!!
-
hi i am designing a web site in which i want to execute different ACCESS queries after a specific time interval ex:- 5 SECONDS. I am using ASP.net with C# and access as database. Thanks in advance!!
I would look into writing a windows service that runs in the background to perform such a job, rather than trying to write it as part of a web site. A service is autonomous, and can be guaranteed to be executing so your job will run on the appropriate schedule. Its difficult, if not impossible, to make such a guarantee from a job triggered by an ASP.NET process. Just a word of warning...executing a query every 5 seconds against a database could cause problems with performance and load. It might be better to reevaluate why you need such a job, and perhapse approach it in a different way (one that does not involve executing queries against an access database every 5 seconds). A windows service could still provide a host for your job.