This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

case sensitive sql statement for username and password

 
Alex Hank
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic