I'm receiving this error message in Visual Studio 2010:
Cannot open database \"Northwind\" requested by the login. The login failed.\r\nLogin failed for user 'Mike\Mike Simpson'
When I try to add the user, which is me. Then SQL server says
Msg 15063, Level 16, State 1, Line 1 The login already has an account under a different user name.
Here is my connection string:
"Data Source=Localhost;Initial Catalog=Northwind;Integrated Security=True"
I'm using SSMS not SQL Server express. I don't know what else I should do. This application used to work before I zipped it up.
Had this problem and this is what solved it for me
sp_changedbowner 'sa'
Then just re-map your login DomainName\UserNameto the database (double click on the login->User Mapping->check your DB->check Datareader/Datawriter->Ok)
Picked it up from here
http://www.sqlservercentral.com/Forums/Topic788865-146-1.aspx
hope this helps some one
The answer to this problem was the connection string. I'm using a NAMED INSTANCE rather than a default instance. Thus my connection string needed to have two slashes and the named instance afterwards.
"Data Source=Localhost\Arius;Initial Catalog=Northwind;Integrated Security=True"
When i made this change everything worked. I hope this helps someone in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With