当我部署用C#编写的Windows应用程序时,出现错误:
此数据库已存在
这是我的代码:
SqlConnection conn = new SqlConnection(@"Server=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|direct.mdf;Trusted_Connection=Yes;Integrated Security=True;User Instance=True"); app.config : <add name="DIRECTPERFERMANCE.Properties.Settings.directConnectionString"
connectionString="Server=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\direct.mdf;Trusted_Connection=Yes;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" /> </connectionStrings>