Java SQL ResultSet Read getRSData(ResultSet rs, String columnName, int jdbcType)

Here you can find the source of getRSData(ResultSet rs, String columnName, int jdbcType)

Description

get RS Data

License

Apache License

Declaration

public static Object getRSData(ResultSet rs, String columnName, int jdbcType) throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.ResultSet;
import java.sql.SQLException;

import java.sql.Types;

public class Main {
    public static Object getRSData(ResultSet rs, String columnName, int jdbcType) throws SQLException {
        if (jdbcType == Types.BIT || jdbcType == Types.BOOLEAN) {
            return rs.getByte(columnName);
        } else {//from  w  w w  .j ava  2  s. c  om
            return rs.getObject(columnName);
        }
    }
}

Related

  1. getRowCount(final ResultSet rs)
  2. getRowCount(ResultSet set)
  3. getRows(final ResultSet rs)
  4. getRows(ResultSet table)
  5. getRsCloumns(ResultSet rs)
  6. getStatement(ResultSet resultSet)
  7. getURI(ResultSet resultSet, String columnLabel)
  8. getURI(ResultSet rs, int col)
  9. getUUIDFromResultSet(ResultSet rset, String name)