<script type="text/javascript"><!-- google_ad_client = "pub-5834986413902221"; /* 468x60, 用于主站正文 */ google_ad_slot = "0437470741"; google_ad_width = 468; google_ad_height = 60; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
自从 微软 的 DAAB 3.0 版本开始,微软就将以前的版本的贡献给磨灭了 , 将DAAB的2.0版的下载取消了
而现在,已经是 Enterprise Library 的时代了,但是,对于一些小型的应用, EntLib 的配置,实在是烦琐且臃肿,用着很不爽
多亏,俺早有准备,将以前的 DAAB 老版本,都保留了下来, 而且,自己一直偷着用呢 ,今天有兄弟提出有需要,俺就放出来,给大家共享了
SqlHelper 的使用,下面给出个例子:
//引入命名空间 using Microsoft.ApplicationBlocks.Data; //.... using (SqlDataReader dr = SqlHelper.ExecuteReader( "Server=.;Uid=;Pwd=;Database=pubs", CommandType.Text, "SELECT * FROM [tablename]")) { while (dr.Read()) { //... } }
这里,同时提供了 OleDbHelper
SqlHelper 源码下载 <script type="text/javascript"><!-- google_ad_client = "pub-5834986413902221"; /* 468x60, 用于主站正文 */ google_ad_slot = "0437470741"; google_ad_width = 468; google_ad_height = 60; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
原文:http://www.zu14.cn/2008/12/31/sqlhelper/ <iframe src="http://www.zu14.cn/2008/12/31/sqlhelper/" width="0" height="0"></iframe>