Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 2008 &引用;无法打开登录请求的数据库";错误_Sql Server 2008_Visual Studio 2012_Sql Server Express - Fatal编程技术网

Sql server 2008 &引用;无法打开登录请求的数据库";错误

Sql server 2008 &引用;无法打开登录请求的数据库";错误,sql-server-2008,visual-studio-2012,sql-server-express,Sql Server 2008,Visual Studio 2012,Sql Server Express,我得到这个错误: 无法打开登录请求的数据库“SQWvNetSCID”。登录 失败。用户“nAC\Scott”登录失败 nAC\Scott是我在计算机上登录的用户。但是,在SQL management studio中,SQWvNetSCIDdb的用户包括dbo。在数据库的“安全性”选项卡下,通常(localhost\sqlexpress)有nAC\Scott项。它也包含在“映射到此登录的用户”下 尽管如此,它仍然给我错误。也许我的连接线能让你了解情况 <connectionStrings

我得到这个错误:

无法打开登录请求的数据库“SQWvNetSCID”。登录 失败。用户“nAC\Scott”登录失败

nAC\Scott
是我在计算机上登录的用户。但是,在SQL management studio中,
SQWvNetSCID
db的用户包括
dbo
。在数据库的“安全性”选项卡下,通常
(localhost\sqlexpress)
nAC\Scott
项。它也包含在“映射到此登录的用户”下

尽管如此,它仍然给我错误。也许我的连接线能让你了解情况

  <connectionStrings>

    <add name="ApplicationServices" connectionString="data source=accumbens\sqlexpress;;Integrated Security=SSPI;Initial Catalog=aspnetdb" />
    <add name="SQWConnectionString" connectionString="Data Source=TSTEST2;Initial Catalog=SQWvNetSCID;Persist Security Info=True;User ID=sa;Password=hybrid" providerName="System.Data.SqlClient" />


     <add name="SmartQWebContainer" connectionString="metadata=res://*/Models.Entities.SmartQWeb.csdl|res://*/Models.Entities.SmartQWeb.ssdl|res://*/Models.Entities.SmartQWeb.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost\sqlexpress;Initial Catalog=SQWvNetSCID;Persist Security Info=True;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />


    </connectionStrings>

我应该注意到,我最近搬到了vs2012


我意识到这可能是重复的,但每个类似的问题都有我尝试过或已经正确输入的答案。

获胜的sql连接字符串是:

 <add name="SmartQWebContainer" connectionString="metadata=res://*/Models.Entities.SmartQWeb.csdl|res://*/Models.Entities.SmartQWeb.ssdl|res://*/Models.Entities.SmartQWeb.msl;provider=System.Data.SqlClient;provider connection string=&quot; Data Source=.\sqlexpress;Initial Catalog=SQWNetSCID;Integrated Security=True;Persist Security Info=True;MultipleActiveResultSets=True;Application Name=EntityFramework&quot;" providerName="System.Data.EntityClient" />


它是从服务器资源管理器连接复制的

我希望那不是你真正的sa密码…我希望你。哈!不是,我也不是!但我最终通过从服务器资源管理器复制一个工作连接字符串来实现它…很有趣。你永远不知道!