<add key="conString" value="Data Source=My-Pc;Initial Catalog=Db1;User ID=sdfsdf;Password=facebook"></add>
现在,首先,我想删除
初始目录
初始目录
使用新数据库名称的零件。
public void statistics()
{
String connString = System.Configuration.ConfigurationManager.AppSettings["conString"];
//here i want to remove this part : Initial Catalog=Db1;
connString = "Data Source=My-Pc;User ID=sdfsdf;Password=facebook";
//Here I have lots of operation and after that I would like to add this part with new database name
string newDb= "db2";
//again add that part with new db : Initial Catalog=Db2;
connString = "Data Source=My-Pc;Initial Catalog=Db2;User ID=sdfsdf;Password=facebook";
}