This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc dbc:RohitDB1"); PreparedStatement stat=con.prepareStatement("select * from RegInfo where Login=? and Password=?"); stat.setString(1,Login); stat.setString(2,Password); rs=stat.executeQuery();
Not that this has anythingto do with servlets per-se, but yes that will happen. If you check the javadoc for the ResultSet class, you'll see that the next() method returns a boolean to indicate if the new current row is valid or not. You are just ignoring that, and going on to read data irrespective.