我想我的问题是如何调试连接字符串?
背景资料
在App.config中
add name =“MyConnection”connectionString =“Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\ Development \ MyFolder \ MyAccessData.mdb;”
一旦我按下F5,就会在这一行设置一个断点:
connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnection"].ToString();
答案 0 :(得分:0)
试试这个..
connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;