Java examples for JDBC:ResultSet
get Object from ResultSet
//package com.java2s; import java.io.IOError; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static <T> T getObject(ResultSet rs, int field) { try {/*from www. j av a 2 s . c om*/ return (T) rs.getObject(field); } catch (SQLException e) { throw new IOError(e); } } }