Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Case Sensitive comparision


Message #1 by "Chirag Shah" <chiragiit@y...> on Wed, 7 Nov 2001 18:05:30

I have MS access 2000 database and database has UserName and Password..

So far mylogin page is working fine only problem is "I want to do case 

sensitive comparision for  both username and password" say for eg.



username: Ken and password: bingo.



comparision shold be case sensitive "Ken" and "ken" are differet user..



Message #2 by gbrown@c... on Wed, 14 Nov 2001 16:29:17
Hi 



UCase in vbscript and object.toUpperCase I think in Javascript.



Is that what you want?



Regards



Graham

> 

> I have MS access 2000 database and database has UserName and Password..

> So far mylogin page is working fine only problem is "I want to do case 

> sensitive comparision for  both username and password" say for eg.

> 

> username: Ken and password: bingo.

> 

> comparision shold be case sensitive "Ken" and "ken" are differet user..

> 

Message #3 by "Drew, Ron" <RDrew@B...> on Wed, 14 Nov 2001 11:50:51 -0500
Javasript..dont forget the function part() and javascript is case sensitive

(Capitalize U and C in toUpperCase)

document.write(string.toUpperCase());

document.write(string.toLowerCase());



-----Original Message-----

From: gbrown@c... [mailto:gbrown@c...] 

Sent: Wednesday, November 14, 2001 11:29 AM

To: ASP Databases

Subject: [asp_databases] Re: Case Sensitive comparision





Hi 



UCase in vbscript and object.toUpperCase I think in Javascript.



Is that what you want?



Regards



Graham

> 

> I have MS access 2000 database and database has UserName and 

> Password.. So far mylogin page is working fine only problem is "I want 

> to do case sensitive comparision for  both username and password" say 

> for eg.

> 

> username: Ken and password: bingo.

> 

> comparision shold be case sensitive "Ken" and "ken" are differet 

> user..

> 



 

---

You are currently subscribed to asp_databases as: RDrew@B... To

unsubscribe send a blank email to $subst('Email.Unsub')

Message #4 by Imar Spaanjaars <Imar@S...> on Wed, 14 Nov 2001 19:28:49 +0100
That would force a case-insensitive comparison. By changing it all to 

Uppercase, there is no longer a difference.



What you need is the StrComp method, which takes three parameters: field 1, 

field 2 and the compare method (either Binary (0) or Text(1)).

In your case, you need the binary option.



You query should look like this:



SELECT ID, Name

FROM tblUsers WHERE StrComp(UserName, 'Ken', 0) = 0



This would return records where the UserName is "Ken", but wouldn't return 

"ken", for example.



HtH



Imar







At 04:29 PM 11/14/2001 +0000, you wrote:

>Hi

>

>UCase in vbscript and object.toUpperCase I think in Javascript.

>

>Is that what you want?

>

>Regards

>

>Graham

> >

> > I have MS access 2000 database and database has UserName and Password..

> > So far mylogin page is working fine only problem is "I want to do case

> > sensitive comparision for  both username and password" say for eg.

> >

> > username: Ken and password: bingo.

> >

> > comparision shold be case sensitive "Ken" and "ken" are differet user..

> >

>

>









  Return to Index