Ado.net Dataset Select using COLLATE

  • Thread starter Thread starter Rob W
  • Start date Start date
R

Rob W

Greetings,

I want to count the rows where the login and password are the same.

The password is case sensitive, the login isn't as selected from a
pre-populated combo box and can never be changed.

I know I can set collation at table creation time but how do I apply it to
the sql statement below?

At the moment I get the syntax error Syntax error: Missing operand after
'COLLATE' operator.
Dim validuser As Integer = usersDS.Tables(0).Select("Name = '" &
cboLogin.SelectedValue.ToString & "' and password COLLATE
SQL_Latin1_General_CP1_CI_AS = '" & txtPassword.Text & "' ").Count

Thanks

Rob
 
Back
Top