马上给分——使用windows服务程序每天早晨9点中执行插入数据库操作,多谢!
请高手指点,谢谢了~
------解决方案--------------------使用“作业(job)” 
 需要有相应的权限。 
 如果是sqlserver2005,在节点“代理”下面。
------解决方案--------------------关注。。//
------解决方案--------------------UP 
------解决方案--------------------1)sql server 作业 
 2)写个服务,定时执行
------解决方案--------------------楼主有什么困难吗?   
 Windows服务会写吗?   
 定时每天早上9点会吗?
------解决方案--------------------	///  <summary>  
 	/// 在指定的时间唤醒指定的程序 
 	///  </summary>  
 	public class Planner:IDisposable 
 	{ 
 		private GOA.Interface.IPlanalbe _plan = null; 
 		private string tag; 
 		private DateTime settingTime; 
 		private System.Threading.Timer timer = null; 
 		///  <summary>  
 		/// 唤醒器 
 		///  </summary>  
 		///  <param name= "timeExpression "> 时间表达式,定义在什么时候唤醒 </param>  
 		///  <param name= "plan "> 需要唤醒的程序 </param>  
 		public Planner(string timeExpression , GOA.Interface.IPlanalbe plan) 
 		{ 
 			tag = timeExpression.Trim(); 
 			_plan = plan; 
 			InitTimer(); 
 		} 
 		private void InitTimer() 
 		{ 
 			System.Threading.TimerCallback callback = new System.Threading.TimerCallback(timer_Elapsed); 
 			timer = new System.Threading.Timer(callback,null,1000,200); 
 			SetNotifyTime(DateTime.Now);  			 
 		} 
 		private void SetNotifyTime(DateTime dt) 
 		{ 
 			string[] t = tag.Split( ': '); 
 			//System.Windows.Forms.MessageBox.Show(this.tag); 
 			int hour = int.Parse(t[0]); 
 			int min = int.Parse(t[1]);   
 			settingTime = new DateTime(dt.Year,dt.Month,dt.Day,hour,min,0); 
 			if(settingTime  < DateTime.Now) 
 			{ 
 				settingTime = settingTime.AddDays(1); 
 			} 
 		}   
 		private void timer_Elapsed(object state) 
 		{ 
 			if(settingTime.ToShortDateString() == DateTime.Now.ToShortDateString() && settingTime.ToShortTimeString() == DateTime.Now.ToShortTimeString()) 
 			{ 
 				try 
 				{ 
 					timer.Change(System.Threading.Timeout.Infinite,System.Threading.Timeout.Infinite); 
 					_plan.Action(); 
 				} 
 				finally 
 				{ 
 					SetNotifyTime(DateTime.Now.AddDays(1)); 
 					timer.Change(1000,200); 
 				} 
 			} 
 		} 
 		#region IDisposable 成员   
 		public void Dispose() 
 		{ 
 			if(timer != null) 
 			{ 
 				timer.Dispose(); 
 			} 
 		}   
 		#endregion     
 	} 
------解决方案--------------------两个方案: 
 1.windows任务记划,设定9点执行程序 
 2.数据库作业 
------解决方案--------------------这里有一篇介绍使用Visual C#创建Windows服务程序文章,只要服务启动了,接下来的事应该简单了。 
 你参考以下。 
 http://doc.chinahtml.com/Manual/asp.net/dot42.htm 
------解决方案--------------------写个线程类,判断当前时间就得了.
------解决方案--------------------你直接写个插入数据库操作的EXE文件,然后用Windows自带的任务计划每天九点执行就可以了,不用那么费事的...
------解决方案--------------------我写了个winform程序,利用windows的任务计划调用该程序,也是每天度去数据库的数据。不知道对楼主有用没有?
------解决方案--------------------