title: Login Failed for existing user SQL Server 2012
body: <p>Using C# I'm trying to connect to an existing DB in SQL Server 2012, from Visual Studio 2012.
  I used the Visual Studio wizard to get my connection string, and I told it to use Windows Authentication (what I am using for my SQL DB, hosted locally on my system).
  This is the error I get:</p>
  
  <pre><code>Cannot open database "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQ\DATA
  \StockHolesDB.mdf" requested by the login. The Login failed.
  Login failed for user '***\***'.
  </code></pre>
  
  <p>My connection string is <code>"Data Source=(LocalDB)\\v11.0;AttachDbFilename=\"C:\\Program Files\\Microsoft SQL Server\\MSSQL11.MSSQLSERVER\\MSSQL\\DATA\\StockHolesDB.mdf\";Integrated Security=True;Connect Timeout=30"</code></p>
  
  <p>Looking around online I saw that one of the solutions is to set that user up in the sql server. But that user <strong>is</strong> already set up in the server. A different username, but the same login name. And when I tried to add a new user with the same login name but different username it wouldn't work.</p>
  
  <p>EDIT: I tried changing the DB name, and that didn't work either.</p>