EnterpriseLibrary.Data 的连接字符串在code里

 using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

SqlDatabase db = new SqlDatabase(“Data Source=127.0.0.1;Initial Catalog=DB;Persist Security Info=True;User ID=sa;Password=");

 DbCommand dbCommand = db.GetSqlStringCommand(strSql);

 db.ExecuteDataSet(dbCommand); 

posted on 2010-06-28 18:45  myx  阅读(355)  评论(0编辑  收藏  举报