app.config文件中有如下代码,C#程序运行时总是提示数据库附加失败?
<?xmlversion="1.0"encoding="utf-8"?><configuration><configSections></configSections><...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="connection" connectionString="server=.;integrated Security=True;database=medicine" />
<add name="Medicine.Properties.Settings.medicineConnectionString"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString1"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString2"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString3"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="connection1" connectionString="server=.;integrated Security=True;database=master" />
</connectionStrings>
<appSettings>
<add key="BgImagePath" value="backGround" />
<add key="DbFile" value="DB\medicine_Data.mdf" />
<add key="LogFile" value="DB\medicine_Log.ldf" />
<add key="DbName" value="medicine"/>
</appSettings>
</configuration> 展开
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="connection" connectionString="server=.;integrated Security=True;database=medicine" />
<add name="Medicine.Properties.Settings.medicineConnectionString"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString1"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString2"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Medicine.Properties.Settings.medicineConnectionString3"
connectionString="Data Source=.;Initial Catalog=medicine;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="connection1" connectionString="server=.;integrated Security=True;database=master" />
</connectionStrings>
<appSettings>
<add key="BgImagePath" value="backGround" />
<add key="DbFile" value="DB\medicine_Data.mdf" />
<add key="LogFile" value="DB\medicine_Log.ldf" />
<add key="DbName" value="medicine"/>
</appSettings>
</configuration> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询