title: Making SQL password query case sensitive using COLLATE
body: <p>I am using the following SQL code in my VB in VS2013. I want to create a login form using a database of users stored into a UserList. However The query is not case sensitive. How do I change my query string to use COLLATE or any other case sensitive comparison</p>
  
  <pre><code>Dim Check As String = _
     "SELECT COUNT(*) AS Expr1 FROM UserList HAVING (Username = '" &amp; _
      _UsernameTextBox.Text &amp; "') AND ([Password]= '" &amp; _PasswordTextBox.Text &amp; _
      "') AND (UserType = '" &amp; User.ToString &amp; "')"
  
      With search
          .CommandText = Check
          .Connection = cn
          If .ExecuteScalar() = 1 Then
              Me.Hide()
              If User = "Trader" Then
  
                  Trader.Show()
              ElseIf User = "Broker" Then
                  Broker.Show()
              ElseIf User = "Corporate" Then
                  Corporate.Show()
              ElseIf User = "System" Then
                  SystemManager.Show()
  
  
              End If
          Else : MsgBox("IncorrectInput")
          End If`
  </code></pre>