| Author |
case sensitive sql statement for username and password
|
Alex Hank
Greenhorn
Joined: Apr 27, 2005
Posts: 16
|
|
I want a case sensitive sql statement to control the logins to my website. I currently use the following statement, however, it does not match case. SELECT userid,username,firstname, lastname, email, usertype, securelevel, upload, download FROM useraccount WHERE username='"+request.getParameter("id")+"' and password='"+request.getParameter("password")+"'" Alex
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
It is a setting on the database during installation if I remember correctly. If you set it, it effects everything on the box. Someone correct me if I am wrong. Eric
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
Eric is correct in that case sensitivity definitely depends on the database. Many, like Oracle, are case sensitive by default. Which database are you using? I don't know of any db setting that leaks through to the OS. However in this case, it is the SQL/db that is requiring the case sensitivity anyway.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: case sensitive sql statement for username and password
|
|
|