Question

Is it possible to do case sensitive string comparison with Simple.Data? I want to validate username and password and need to make password comparison case sensitive.

Was it helpful?

Solution

It's not currently possible to do this using Simple.Data, the COLLATE keyword isn't supported (assuming you're using SQL Server).

That said, it sounds like you're "doing it wrong" regarding password handling. You should have a per-user "salt" value which you combine with the entered password in your hashing algorithm. So you need to FindByUsername the record and then verify the password in your application code. If you really need the user name to be case sensitive (which is unusual) then you can do that comparison in code, too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top