>>>>>One more question - why in the UPDATE statement where is
>>>>>username = lower(@username) ? Why do we use lower is SQL Server is case insensitive ?
>>>
>>>He is setting it to lower all over the palace and storing it as lower, because SQL Server IS case SENESITIVE.
>>>
>>
>>No, it's case insensitive. I just tried
>
>Wow... major whole in my understanding of MSSQL thank you for checking that!!!!!
>
>You may have just saved my a** at some point in the future.
>
>I learn something new every day <g>
>
>Thanks!
>
>It is possible to set the server to be case sensitive, by changing the colation. So maybe that is why he was doing that?
This is MS code. Perhaps they expect that data would be saved in lower case and the collation may be set to use case-sensitive search. However, I see that in our case the data are saved in correct case and there is a special field in this table called lowerusername where the data indeed saved in lower case. But then this field should have been used.
Anyway, is there someone using Login control from MS without any extra code. Could this be a problem from MS or most likely from our side?
Thanks again.
If it's not broken, fix it until it is.
My Blog