trminh89
-2
Q:

get column count in java

/**
     * Get the column count
     * @return count of column the result set have
     */
    public static int getColumnCount(){

        int columnCount = 0;

        try {
            ResultSetMetaData rsMetaData = rs.getMetaData();
            columnCount = rsMetaData.getColumnCount();
        } catch (SQLException e) {
            System.out.println("ERROW WHILE GETTING COLUMN COUNT " +e.getMessage());
        }
        return columnCount;
    }
0

New to Communities?

Join the community