摘要: 第一、sql中写事物begin try begin transaction insert into shiwu (asd) values ('aasdasda'); commit transaction end try begin catch select ERROR_NUMBER() as errornumber rollback transaction end catch第二、c#中执行事物SqlParameter[] paras = new SqlParameter[] { }; paras = list.ToArray(); ... 阅读全文
posted @ 2013-05-29 13:41 王洪洪 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 第一、创建一个Windows服务第二、在自动生成的Program类中写你要写的代码using System;using System.Collections.Generic;using System.Linq;using System.ServiceProcess;using System.Text;namespace WindowsTest{ static class Program { /// /// 应用程序的主入口点。 /// static void Main() { Servi... 阅读全文
posted @ 2013-05-29 09:36 王洪洪 阅读(286) 评论(0) 推荐(1) 编辑