Java SQL ResultSet Print printSet(ResultSet set, int columns)

Here you can find the source of printSet(ResultSet set, int columns)

Description

print Set

License

Open Source License

Declaration

public static void printSet(ResultSet set, int columns) throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static void printSet(ResultSet set, int columns) throws SQLException {
        while (set.next()) {
            for (int i = 1; i <= columns; i++) {
                System.out.print(set.getString(i) + ", ");
            }//w w w .j  a  v a 2s.com
            System.out.println();
        }
    }
}

Related

  1. printResultSetMetadata(ResultSetMetaData rsmd, Writer out)
  2. printResultSetRow(ResultSet rs)
  3. printResultsToFile(ResultSet rst, File outFile)
  4. printRow(ResultSet pk)
  5. printRsetTypeAndConcurrencyType(ResultSet rset)
  6. printValues(final ResultSet resultSet)
  7. printView(ResultSet rs)
  8. printWarnings(ResultSet resultSet)