title: SQL Server 2008 - Login failed for user 'user1' The user is not associated with a trusted SQL Server connection
body: <p>I have installed SQL Server 2008 R2 on Windows XP.</p>
  
  <p>In installation process I selected 'SQL Server and Windows Authentication Mode'</p>
  
  <p>When I click right button of the mouse in SQL Server Management Studio on Server -> Security tab 'SQL server and Windows Authentication Mode' is selected.</p>
  
  <p>But when I click on my Database -> Properties - View connection properties Authentication Method is set on Windows Authentication.</p>
  
  <p>To my database was added one <code>user1</code> with password <code>user1</code>.</p>
  
  <p>But I can't log in to my database from C# (Visual Studio 2008) because error occurs:</p>
  
  <blockquote>
    <p>Login failed for user 'user1'  The
    user is not associated with a trusted
    SQL Server connection</p>
  </blockquote>
  
  <p>What isn't right ?</p>
  
  <hr>
  
  <p>When I get:</p>
  
  <pre><code>string connectionStr = @"Data Source=rmzcmp\SQLExpress;Initial Catalog=ResourcesTmp;Integrated Security=True";
  </code></pre>
  
  <p>I have following error:</p>
  
  <p>{"Cannot open database \"ResourcesTmp\" requested by the login. The login failed.\r\nLogin failed for user 'RMZCMP\rm'."}</p>
  
  <p>rm is my original user name on which I log in to my computer.
  When I get rm I have error:</p>
  
  <pre><code>{"Login failed for user 'rm'. The user is not associated with a trusted SQL Server connection."}
  </code></pre>
  
  <p>again.</p>
  
  <p>Regards</p>