有关连接字符串的sql异常

时间:2011-08-15 21:05:10

标签: asp.net connection-string sqlexception

我有以下连接字符串:

  <connectionStrings>
<clear/>

<add name="modelConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Little Rabbit\Desktop\YourGuruSite\App_Data\ASPNETDB.MDF';Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="CP_AllQuestionsAnswered" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Little Rabbit\Desktop\New Folder (2)\YourGuruDB1.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="YourGuruDB" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Little Rabbit\Desktop\New Folder (2)\YourGuruDB1.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/>

运行网站时出现以下错误:

An attempt to attach an auto-named database for file C:\Documents and Settings\Little Rabbit\Desktop\New Folder (2)\YourGuruDB1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

0 个答案:

没有答案