c#读取web.config连接字符串
2008-11-14 13:10 Iron 阅读(352) 评论(0) 编辑 收藏 举报string myDataString =
ConfigurationManager.ConnectionStrings["AdvWorks"].ConnectionString;
System.Data.SqlClient.SqlConnection sqlConn =
new System.Data.SqlClient.SqlConnection(myDataString);
sqlConn.Open();
ConfigurationManager.ConnectionStrings["AdvWorks"].ConnectionString;
System.Data.SqlClient.SqlConnection sqlConn =
new System.Data.SqlClient.SqlConnection(myDataString);
sqlConn.Open();