import java.sql.*;

public class H9OD2_2000 {
	public static void main(String args[]) {
    String url = "jdbc:odbc:H9OD2_2000";
    Connection con;
		Statement stmt;
    String query = "select x, y from Table1";
		try
    {
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    }
    catch(java.lang.ClassNotFoundException e)
    {
      System.err.print("ClassNotFoundException: ");
      System.err.println(e.getMessage());
    }
		try
    {
      con = DriverManager.getConnection(url,"myLogin", "myPassword");
			stmt = con.createStatement();
/*
      stmt.executeUpdate("insert into KAHVE " +
                        "values('Kolombiya',101, 7.99, 0, 0)");
      stmt.executeUpdate("insert into KAHVE " +
                         "values('Fransız', 49, 8.99, 0, 0)");
      stmt.executeUpdate("insert into KAHVE " +
                         "values('Espresso', 150, 9.99, 0, 0)");
      stmt.executeUpdate("insert into KAHVE " +
                     "values('Kolombiya kafeinsiz', 101, 8.99, 0, 0)");
      stmt.executeUpdate("insert into KAHVE " +
                         "values('Fransız kafeinsiz', 49, 9.99, 0, 0)");
      stmt.executeUpdate("insert into KAHVE " +
                         "values('Brezilya', 89, 7.99, 0, 0)");
*/
			ResultSet rs = stmt.executeQuery(query);
			System.out.println("x   y\n");
			while (rs.next())
      {
        int x = rs.getInt("x");
        int y = rs.getInt("y");
				System.out.println(x + "   " + y);
			}
			stmt.close();
			con.close();
		}
    catch(SQLException ex)
    {
			System.err.println("SQLException: " + ex.getMessage());
		}
	}
}
