Results 1 to 3 of 3
- 02-19-2014, 09:11 AM #1
Member
- Join Date
- Feb 2014
- Posts
- 1
- Rep Power
- 0
Textfield lowercase and uppercase
hi
String sql = "SELECT * FROM user WHERE username =? and password =?" ;
pst = conn.prepareStatement(sql);
pst.setString(1, username.getText());
pst.setString(2, password.getText());
rs = pst.executeQuery();
if(rs.next()){
do somethig;
{
i have 2 textfield that take username and password,
on the database thete is a user table
id username password name surname
1 test test test test
people put username and password to the textfield like test test and they logon,
but when they write username = TESt and password = teST they can logon too,
there is no TESt user on the database or teST password, is the textfield making lowercase all text? how can i fix this?
or pst.setString(1, username.getText()); is this code changing the text?
- 02-19-2014, 11:09 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Re: Textfield lowercase and uppercase
A JTextField doesn't change the case of its text; there must be something in your database that ignores the case of the text ...
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
- 02-19-2014, 12:25 PM #3
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Similar Threads
-
How to lowercase all arguments
By reverton in forum New To JavaReplies: 1Last Post: 04-28-2013, 07:35 AM -
how to determine if uppercase vowel or consonant, lowercase vowel or consonant, etc
By mariahfrancheszca in forum New To JavaReplies: 8Last Post: 08-17-2011, 12:15 PM -
Check uppercase or lowercase letter
By ala_mages in forum New To JavaReplies: 2Last Post: 12-30-2010, 03:16 PM -
uppercase and lowercase please help
By cuziwow in forum New To JavaReplies: 4Last Post: 04-11-2010, 08:54 AM -
String uppercase/lowercase
By Java Tip in forum Java TipReplies: 0Last Post: 12-19-2007, 10:22 AM
Bookmarks