View Single Post
  #2 (permalink)  
Old January 16th, 2006, 01:24 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quick question before I answer this one: Is there any reason why you're not using the new ASP.NET 2.0 Login controls that work with SQL Server Express and SQL Server?

Why develop your own login mechanism when you have all the tools for authentication available out of the box?

That said, take a look at StrComp. It's used compare strings. As an optional parameter, you can set options for how the compare is performed. 0 is a binary compare, which means it's case sensitive:

SELECT 1 FROM Members
WHERE StrComp(Members.Password, @password, 0) = 0

If the StrComp returns 0, it means Members.Password equals @password.

http://msdn.microsoft.com/library/de...fctstrcomp.asp

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote