List of usage examples for javax.sql RowSet getInt
int getInt(int columnIndex) throws SQLException;
ResultSet
object as an int
in the Java programming language. From source file:Main.java
static void displayRowSet(RowSet rs) throws SQLException { while (rs.next()) { System.out.println(rs.getRow() + " - " + rs.getString("col1") + ":" + rs.getInt("col2") + ":" + rs.getString("col3")); }/*from w w w . ja v a 2 s .com*/ }
From source file:com.oracle.tutorial.jdbc.JdbcRowSetSample.java
private void outputRowSet(RowSet rs) throws SQLException { rs.beforeFirst();// w w w .jav a2 s .c om while (rs.next()) { String coffeeName = rs.getString(1); int supplierID = rs.getInt(2); float price = rs.getFloat(3); int sales = rs.getInt(4); int total = rs.getInt(5); System.out.println(coffeeName + ", " + supplierID + ", " + price + ", " + sales + ", " + total); } }