Java SQL ResultSet Print printCols(final ResultSetMetaData paymentTableResultSetMetaData, final String logging_prefix)

Here you can find the source of printCols(final ResultSetMetaData paymentTableResultSetMetaData, final String logging_prefix)

Description

print Cols

License

Apache License

Declaration

public static void printCols(final ResultSetMetaData paymentTableResultSetMetaData, final String logging_prefix)
            throws SQLException 

Method Source Code

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

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

public class Main {
    public static void printCols(final ResultSetMetaData paymentTableResultSetMetaData, final String logging_prefix)
            throws SQLException {
        System.out.println(logging_prefix);
        for (int i = 1; i <= paymentTableResultSetMetaData.getColumnCount(); i++) {
            //            System.out.print(paymentTableResultSet.getString(i) + "\t");
            //            System.out.println(paymentTableResultSetMetaData.getColumnType(i) + "," + paymentTableResultSetMetaData.getColumnTypeName(i) + "," + paymentTableResultSetMetaData.isNullable(i));
            System.out.print(paymentTableResultSetMetaData.getColumnName(i) + "\t");
        }// ww w. j  a  v  a  2s  . c  om

        System.out.println("\n");
    }
}

Related

  1. prettyFormat(ResultSet res)
  2. print(ResultSet resultSet)
  3. print(ResultSet rs, PrintStream out)
  4. print(ResultSet rs, PrintStream out)
  5. printColTypes(ResultSetMetaData rsmd)
  6. printHeader(PrintWriter pw, ResultSet rs)
  7. printHeaders(ResultSetMetaData rsmd, PrintStream out)
  8. printItems(ResultSet rs)