摘要: public DataTable Select() { SqlConnection con = null; try { con = new SqlConnection("Data Source=192.168.80.26;Initial CataLog=db_Dinner;UID=sa;Pwd=111111"); SqlCommand com = new SqlCommand("Procedure", con); com.CommandText = "存储过程名"; SqlDataAdapter da = new SqlDataAda 阅读全文
posted @ 2011-02-24 21:07 x喜德盛 阅读(401) 评论(0) 推荐(0) 编辑
摘要: begin tran---声明事务declare @err intset @err =0set @err=@err+@@ERRORif(@@ERROR >0)beginrollback tran --回滚endcommit tran--提交事务CREATE trigger TRIG---声明触发器on dbo.Foodafter INSERT ,DELETE ,UPDATEAS BEGINSELECT * FROM DELETEDSELECT * FROM INSERTEDPRINT 'ok'ENDDECLARE CUR---声明游标CURSOR FOR SELECT F 阅读全文
posted @ 2011-02-24 21:03 x喜德盛 阅读(247) 评论(0) 推荐(0) 编辑