<%@ page import="java.sql.*" %><% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %> Navigating in a Database Table Navigating in a Database Table <% int current = 1; if(request.getParameter("hidden") != null) { current = Integer.parseInt(request.getParameter("hidden")); } Connection connection = DriverManager.getConnection( "jdbc:odbc:data", "userName", "password"); Statement statement = connection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet resultset = statement.executeQuery("select * from tableName"); if(current < 1){ current = 1; } resultset.last(); int rows = resultset.getRow(); if(current <= rows){ resultset.absolute(current); } %> ID Name City State Country <%= resultset.getString(1) %> <%= resultset.getString(2) %> <%= resultset.getString(3) %> <%= resultset.getString(4) %> <%= resultset.getString(5) %> ">