title: Connecting to Microsoft SQL Server from Visual Basic
body: <p>I am attempting to connect to Microsoft SQL Server 2008 R2 from within Microsoft Visual Studio 2010.  My connection string is as follows:</p>
  
  <p><code>connection = New SqlConnection("Server=localhost;Database=greenapplication;User ID=WindowsID;Password=WindowsPassword")</code></p>
  
  <p>I keep getting this exception: System.Data.SqlClient.SqlException:</p>
  
  <p><code>Login failed for user 'WindowsID'.</code></p>
  
  <p>What am I doing wrong?  Are there certain permissions that I have to set up?</p>