Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 problem at uppercase and lowercase letters

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2008-01-29 : 07:52:17
hi,
i have a table tbl_login,
id varchar(10) primary key ,
pwd varchar(20) not null,

i am saving asp.NET2.0 into pwd field for id test.
from my front end i am giving credentials as id:test, pwd:asp.net2.0, then sql is validating it. i want to distiguish uppercase n lowercase from database side. how can i do it? it should not validate when enter asp.net2.0 insetad of asp.NET2.0. please help on this issue


One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-29 : 07:55:25
set the collation on that column to case sensitive.
although you should hash the password and store that in the db and compare to that.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

rammohan
Posting Yak Master

212 Posts

Posted - 2008-01-29 : 07:59:56
hi,
thank for suggesting me. i am encrypting the passwords by using symmetric key with help of aes_256 algorithm. is this cause any problem for case sensitive for pwd column?

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

rammohan
Posting Yak Master

212 Posts

Posted - 2008-01-29 : 08:01:06
hi,
can u tell me what collation shall i have to use for this?

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-29 : 08:05:12
a case sensitive one...
list of all collations can be found like this:
select * from ::fn_helpcollations()

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page
   

- Advertisement -