Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how can we give case sensitive for user login text and data base value in C# .net windows form application because of new for windows form application and I am not get the proper solution in google
Posted
Comments
Bernhard Hiller 7-Aug-14 9:20am    
Which database system do you use?
Note that e.g. with postgres, text data is always case sensitive.

1 solution

Using collations
eg:
SQL
if ('a'='A' Collate Latin1_General_CI_AI) 
    print'same 1'
else
    print 'different 1'

if ('a'='A' Collate Latin1_General_CS_AI) 
    print'same 2'
else
    print 'different 2' 

The CS in the collation name indicates Case Sensitive (and CI, Case Insensitive). The AI/AS relates to accent sensitivity.

And If you want to check in C# code then you can Use
IsUpper()
Or
IsLower()
Methods.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900