jdbc: : please help! its urgent
please help me out ,Its working successfully butinspite of right username and password in DataBase its showing
UR NOTa valid user... what alteration must be there in try block?
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
con=DriverManager.getConnection("jdbc:mysql://localhost/userdetails","mysql","xxxx");
st=con.createStatement();
rs=st.executeQuery("select * from MyUser223 where uname='s1' and upass='s2'; ");
if (rs.next())
{
out.println("Valid user");
return;
}//if
}//try
catch(Exception e){out.println(e);}
finally{try{con.close();}catch(Exception e){}}
out.println("<center>Sorry UR not a valid user</center>");
}//service

