Java SQL ResultSet arrayOfResult(ResultSet rs)

Here you can find the source of arrayOfResult(ResultSet rs)

Description

array Of Result

License

Open Source License

Declaration

private static String[] arrayOfResult(ResultSet rs) throws SQLException 

Method Source Code

//package com.java2s;

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

public class Main {
    private static String[] arrayOfResult(ResultSet rs) throws SQLException {
        ResultSetMetaData rsm = rs.getMetaData();
        String ret[] = new String[rsm.getColumnCount()];
        for (int i = 0; i < ret.length; i++) {
            ret[i] = rs.getString(i + 1);
        }//from w w  w .  j a  v  a 2  s  .co m
        return ret;
    }
}

Related

  1. cleanupAfterQuery(final ResultSet rs, final Statement stmt)
  2. cleanupConnection(ResultSet rs, Statement stmt, Connection conn)
  3. cleanupJDBCResouce(ResultSet rs, Statement stmt, String oldCatalog, Connection conn)
  4. consume(ResultSet rs)