title: SQL Server login works in a connection string, but fails in DSN
body: <p>I have a web site and I'm trying to setup a DSN instead of using a connection string because it seems more secure.</p>
  
  <p>The following connection string works fine in my site:</p>
  
  <pre><code>"Server=servername; database=mydb; user id= web.account; password=PassW0rd!; Integrated Security=SSPI"
  </code></pre>
  
  <p>However, when I try to set up a DSN (<a href="http://msdn.microsoft.com/en-us/library/ms712362%28v=vs.85%29.aspx" rel="nofollow noreferrer">using the 64-bit odbc admin</a>) I get the following error:</p>
  
  <pre><code>Connection failed:
  SQLState: '28000'
  SQL Server Error: 18456
  [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'web.account'
  </code></pre>
  
  <p>Keep in mind, I'm using the same account and password I use in the connection string (which works). It's weird too because the error occurs right after I click 'Next' on the "How should SQL Server verify the authenticity of the login ID?" page. </p>
  
  <p><strong><em>It seems like the odbc admin does not even try to connect to the server to verify the credentials. What can I check to prove this / How can I fix this?</em></strong></p>
  
  <p>Things I've tried:</p>
  
  <ul>
  <li>I have checked the server authentication mode, <a href="https://stackoverflow.com/questions/20923015/microsoft-sql-server-error-18456">as proposed in other solutions</a>, and that is set to "SQL Server and Windows Authentication mode", as it should be.</li>
  <li>I have tried creating both a User and System DSN - both get the same error, this seems like further evidence that it's not trying to connect to the server to check the credentials.</li>
  <li>I have tried the same DSN creation on multiple servers, all have the same problem. Is it possible the SQL Server is refusing these types of connections?</li>
  </ul>
  
  <p><strong><em>UPDATE 1</em></strong>:
  The DBA just told me that the web.account is actually a Windows account, not an SQL account. I guess that's why the odbc isn't working, because it doesn't try to connect as a different windows user, only as the current windows user. So now the question is, how do I set up a DSN with a different windows account? Or, is that even possible?</p>