本文介绍了如何在app.config中添加connectionstring的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<appSettings> <add key="dbVisitorManagement1" value="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbVisitorManagement;Data Source=SHREE-PC"/> </appSettings>
这是我在app.confi中所做的g文件。但我得到一个错误,因为connectionString没有正确实现...
this is what I had done in my app.config file. but i had got an error as connectionString is not properly implemented...
推荐答案configuration-connection-string-in-app-config-file-during-runt / [ ^ ] 使用connectionstring标签而不是appsettings configuring-connection-string-in-app-config-file-during-runt/[^] Use connectionstring tag instead of appsettings
将它放在ConnectionStrings而不是appSettings! Put it in ConnectionStrings not appSettings!
<appSettings> <add key="dbVisitorManagement1" value="Provider=SQLOLEDB.1;Integrated Security=True;Persist Security Info=False;Database=dbVisitorManagement;Server=SHREE-PC"/> </appSettings>
更多推荐
如何在app.config中添加connectionstring
发布评论