Answers for "get rows count from java.sql.ResultSet"

0

get column count jdbc

/**
     * 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;
    }
Posted by: Guest on November-30-2020
0

how do you get row count in jdbc

Row number always starts with 1
My last rowNumber is my row count
When I move my cursor to the last location to get rowCount
Posted by: Guest on November-28-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language