title: Trouble creating an sql connection string
body: <p>I have an example of a login page that runs off of sql in which I am trying to customize it to my server.</p>
  
  <p>I'm running into issues with the sql string.</p>
  
  <p>Here is the original (with my table info). This appears to be pulling the username and password from the login control with @user and @password; I think. If not what is it doing? what exactly is @user and @password?</p>
  
  <pre><code>string sql = "select count(*) from ResidentUserDatabase where users = @user and passwords = @password";
  </code></pre>
  
  <p>Here is where I hard coded a username and password in. This works and I was able to login just fine. Obvioulsy not useable, but confirms i am connecting to the database and pulling user info</p>
  
  <pre><code>string sql = "select count(*) from ResidentUserDatabase where users = 'user' and passwords = 'pass'";
  </code></pre>
  
  <p>Now, here is where i have issues (since the first version doesn't work...). I tried to bypass the @user and @password and am apparently not doing it right.</p>
  
  <pre><code>string sql = "select count(*) from ResidentUserDatabase where users = '" + LoginControl.UserName.ToString() + "' and passwords = '" + LoginControl.UserName.ToString() + "'";
  </code></pre>
  
  <p>I'm not really sure where to go from here, or why the example doesnt work.</p>
  
  <p>thanks</p>