Exemple #1
0
  public static void printRS(Recordset rs) {
    Fields fs = rs.getFields();

    for (int i = 0; i < fs.getCount(); i++) {
      System.out.print(fs.getItem(i).getName() + " ");
    }
    System.out.println("");

    rs.MoveFirst();
    while (!rs.getEOF()) {
      for (int i = 0; i < fs.getCount(); i++) {
        Field f = fs.getItem(i);
        Variant v = f.getValue();
        System.out.print(v + " ");
      }
      System.out.println("");
      rs.MoveNext();
    }
  }