Java examples for java.sql:ResultSet
get Long Value From ResultSet
//package com.java2s; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static Long getLongValueFromRs(ResultSet rs, String columnName) { Long val = null; try {/*from w w w . ja va 2s . co m*/ if (rs.getString(columnName) != null) { val = new Long(rs.getLong(columnName)); } } catch (SQLException sqle) { val = null; } return val; } }