Java examples for java.sql:ResultSet
get Byte Value From ResultSet
//package com.java2s; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static Byte getByteValueFromRs(ResultSet rs, String columnName) { Byte val = null; try {//from ww w. jav a 2 s .c o m if (rs.getString(columnName) != null) { val = new Byte(rs.getByte(columnName)); } } catch (SQLException sqle) { val = null; } return val; } }