读取web.config数据库连接字符串2种方法
string myConn = System.Configuration.ConfigurationManager.ConnectionStrings["strDB"].ConnectionString;
string myConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["strDB"].ToString();
app.config 连接信息一般是写在web.config里
位实例化是不是忘记new XXConnection(sqlstr)了?
System.Configuration.ConfigurationManager.ConnectionStrings["strDB"].ConnectionString;