Kashipara.com is a community of ONE million programmers and students, Just like you, Helping each other.Join them. It only takes a minute: Sign Up
Job Resume Templateif(ae.getSource()==next)<br> {<br> String scode=tcode.getText();<br> try<br> {<br> Connection con=DriverManager.getConnection("jdbc:odbc:online");<br> Statement s=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);<br> PreparedStatement ps=con.prepareStatement("select * from adqus where Test_Name='"+scode+"' "); <br> ResultSet rs = ps.executeQuery();<br><br> while(rs.next())<br> {<br> System.out.println("test");<br> for(i=1;i<=1;i++)<br> {<br> qusno.setText(rs.getString(3));<br> tqus.setText(rs.getString(4));<br> topa.setText(rs.getString(5));<br> topb.setText(rs.getString(6));<br> topc.setText(rs.getString(7));<br> topd.setText(rs.getString(8));<br> i++;<br> }<br> }<br> }<br> <br> catch(Exception ex)<br> {<br> System.out.println(ex);<br> }<br>}<br><br>if(ae.getSource()==previous)<br> {<br> String scode=tcode.getText();<br> try<br>{ <br> Connection con=DriverManager.getConnection("jdbc:odbc:online");<br> Statement s=con.createStatement();<br> PreparedStatement ps=con.prepareStatement("select * from adqus where Test_Name='"+scode+"'"); <br> ResultSet rs = ps.executeQuery();<br> while(rs.next())<br> {<br> System.out.println("test");<br> for(i=0;i<1;i--)<br> {<br> qusno.setText(rs.getString(3));<br> tqus.setText(rs.getString(4));<br> topa.setText(rs.getString(5));<br> topb.setText(rs.getString(6));<br> topc.setText(rs.getString(7));<br> topd.setText(rs.getString(8));<br> i--;<br> }<br> }<br> } <br> <br> catch(Exception ex)<br> {<br> System.out.println(ex);<br> }<br>}<br><br>