Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Dear Sirs or Madams,
I would like to try to insert data automatically into database everyday. What things should I try?
Thank You
Posted
Updated 1-Oct-15 17:16pm
v2
Comments
aarif moh shaikh 2-Oct-15 0:22am    
use SQL Server Agent

If you're using a full version of Sql Server (not Express), you can use SQL Server Agent[^] to schedule operations.

If you're using Express, then you can used Windows Scheduler[^] to run a task and use appropriate command line tools such as sqlcmd[^] to execute database operations.
 
Share this answer
 
Comments
Aung Nay Myo 2-Oct-15 0:28am    
I would like to start query at the time of asp.net website starting and insert data automatically into database everyday without event.
Wendelius 2-Oct-15 1:16am    
I'm sorry but I don't quite understand the situation. Do you restart the web site every day or something like that?

Not sure but one option could possible be to use a constructor of a static class. This would be called only once during the lifetime of an app inside a pool. But as said I'm not quite sure what is the requirement you have.
I would like to start query at the time of asp.net website starting and insert data automatically into database everyday without event.
 
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