http://www.lifesbizzare.blogspot.com || OCJP:81%
Time is what we want the most, but what we use the worst. -- William Penn
Robin John wrote:Line number 51 ->
why dont you try using "equals" String Equals
http://www.lifesbizzare.blogspot.com || OCJP:81%
http://www.lifesbizzare.blogspot.com || OCJP:81%
Time is what we want the most, but what we use the worst. -- William Penn
http://www.lifesbizzare.blogspot.com || OCJP:81%
http://www.lifesbizzare.blogspot.com || OCJP:81%
Vishal Hegde wrote:When i changed the if loop it worked?? but it makes no sense??
SCJP 6
http://www.lifesbizzare.blogspot.com || OCJP:81%
Larry Chung wrote:
Vishal Hegde wrote:When i changed the if loop it worked?? but it makes no sense??
Vishal, of course (U_Name!=Data_Id && Passwd!=Dat_Passwd) will produce "Login Successful" because your ResultSet data very likely has instances when usernames and passwords do not match the entered username and password in the Request. Therefore the boolean logic in the "if" statement will be TRUE. What is the data in your Customer data table? For troubleshooting the problem, I suggest you change the "else" block to:
Then tell us what is your output.
http://www.lifesbizzare.blogspot.com || OCJP:81%
SCJP 6
SCJP 5.0
Rahul Manikuntla wrote:So Vishal, what did you find out about the cause of the problem?
http://www.lifesbizzare.blogspot.com || OCJP:81%
Larry Chung wrote:Vishal, please show me the output.
http://www.lifesbizzare.blogspot.com || OCJP:81%
http://www.lifesbizzare.blogspot.com || OCJP:81%
Vishal Hegde wrote:Database is like this
User_Name Password_Name
tiwarish demo@345
Should i try overridinng hashcode() or equals() method???
http://www.lifesbizzare.blogspot.com || OCJP:81%
http://www.lifesbizzare.blogspot.com || OCJP:81%
Vishal Hegde wrote:
mallikarjun don wrote:Is your problem solved ?
May be it may help's you try it
Remove the quoted one
Vishal Hegde wrote:
Add the fallowing code
Use prepared statement it will be so easy
http://www.lifesbizzare.blogspot.com || OCJP:81%
What's a year in metric? Do you know this metric stuff tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|