title: Creating Login Form Using Visual Studio
body: <p>I'm new to Visual Studio 2010 and I'm trying to create a Login form.</p>
  
  <p>I have this code.</p>
  
  <pre><code>        OdbcConnection con = new OdbcConnection("host=localhost;usr=root;password=admin;db=timekeeping;");
          OdbcCommand cmd = new OdbcCommand("SELECT * FROM receptionist WHERE username = '" + username_login.ToString() + "' AND password = '" + password_login.ToString() + "';");
          cmd.Connection = con;
          con.Open();
          OdbcDataReader reader = cmd.ExecuteReader();
          while (reader.Read())
          {
              if (reader.GetString(0) != 1)
              { return false; }
              else
              { return true; }
          }
          cmd.Connection.Close();
          reader.Dispose();
          cmd.Dispose();
  </code></pre>
  
  <p>There are errors but I don't know what is the problem with that.
  Here's a screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/JRZTt.png" alt="enter image description here"></p>
  
  <p>Hoping that someone ca help me..</p>
  
  <p>Thanks</p>