Greetings,
I am designing a login screen and require 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.
I have done other login screens running commands against a connection, I was curious to see if the same could be done using a dataset.
I have never had case-sensitive passwords before so am new to COLLATE.
Apologoies if this is the wrong section as is ADO.net/T-SQL based.
Thanks
Rob
I am designing a login screen and require 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.
Code:
Dim validuser As Integer = usersDS.Tables(0).Select("Name = '" & cboLogin.SelectedValue.ToString & "' and password COLLATE SQL_Latin1_General_CP1_CI_AS = '" & txtPassword.Text & "' ").Count
I have done other login screens running commands against a connection, I was curious to see if the same could be done using a dataset.
I have never had case-sensitive passwords before so am new to COLLATE.
Apologoies if this is the wrong section as is ADO.net/T-SQL based.
Thanks
Rob