title: Can't connect to SQL Server database: Login failed for user 'sa''
body: <p>I can't simply connect to my database because of this error</p>
  
  <blockquote>
    <p>Login failed for user 'sa'</p>
  </blockquote>
  
  <p>Consider these lines of code:</p>
  
  <pre><code>SqlConnection conn = new SqlConnection("Data Source=arohbi;Initial Catalog=SPADA_FIS;Persist Security Info=True;User ID=sa;Password=p@ssword");
  conn.Open();
  </code></pre>
  
  <p>After the execution of <code>conn.Open()</code> I got this weird error message </p>
  
  <blockquote>
    <p>Login failed for user 'sa'.</p>
  </blockquote>
  
  <p>Last time I used this setup and connection string and it work perfectly but one day when I try to connect this message is the only response. Still I manage to connect using management studio. The connection from the serverdatabase to my local machine work perfectly. Anyone guys knows the answer.</p>
  
  <p>Things get worst this time. Take a look at these images:
  <img src="https://i.stack.imgur.com/Uha0B.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/yCxHK.png" alt="enter image description here"></p>
  
  <p>I used same connection string on both sqlconnection but i was confuse why the other one failed?</p>
  
  <p>Connection string used on both:</p>
  
  <pre><code>Data Source=arohbi;Initial Catalog=SPADA_FIS;Persist Security Info=True;User ID=espada;Password=p@ssword
  </code></pre>