public TableModel obtenerResumenMembresiasDB(int ano, String mes) {
        Connection conn = null;
        Statement stmt = null;
        String query = "SELECT TC.IDCLIENTE, NOMBRE, FECHA_INICIO, DURACION, "
                + "DESCRIPCION, PRECIO FROM GYMDB.CLIENTES TC JOIN "
                + "GYMDB.MEMBRESIAS AS TM ON TC.IDCLIENTE = TM.IDCLIENTE WHERE "
                + "FECHA_INICIO LIKE '" + ano + "-" + mes + "-%'";
        ResultSet rs = null;
        
        try {
            conn = conectar(conn);
            stmt = conn.createStatement();
            rs = stmt.executeQuery(query);

            ResultSetMetaData metaData = rs.getMetaData();
            int numCols = metaData.getColumnCount();
            Vector nombresCols = new Vector();

            // Get the column names
            for (int column = 0; column < numCols; column++) {
                nombresCols.addElement(metaData.getColumnLabel(column + 1));
            }

            // Get all rows.
            Vector rows = new Vector();

            while (rs.next()) {
                Vector newRow = new Vector();
                for (int i = 1; i <= numCols; i++) {
                    newRow.addElement(rs.getObject(i));
                }
                rows.addElement(newRow);
            }

            return new DefaultTableModel(rows, nombresCols);
        } catch (SQLException se) {
            System.out.println("Error: " + se);
            return null;
        } finally {
            try {
                stmt.close();
            } catch (SQLException ex) {
                System.out.println(ex);
            }
            try {
                conn.close();
            } catch (SQLException ex) {
                System.out.println(ex);
            }
        }
    }