摘要: 事务1、创建事务的结构SqlConnection sqlConnection = new SqlConnection(); ...初始化连接 // 开启事务 SqlTransaction sqlTransaction = sqlConnection.BeginTransaction(); // 将事务应用于Command SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = sqlConnection; sqlCommand.Transaction = sqlTransaction; try { // 利用sqlco 阅读全文
posted @ 2011-04-21 12:43 勇气 阅读(35918) 评论(2) 推荐(4) 编辑
摘要: 这一节主要是要讲DataBind,这个在ASP.net中是很重要的东东,几乎所有的控件都需要它来控制数据的操作。也可以说是ASP.net的数据核心。 我们先来看一个简单的例子:<% @ Page Language="C#" %><% @ Import Namespace="System.Data" %><Script Language="C#" Runat="Server">public void Page_Load(Object src,EventArgs e){file:// 阅读全文
posted @ 2011-04-21 12:17 勇气 阅读(15327) 评论(1) 推荐(1) 编辑