Here's the point whining has been very successful for the dog it gets him what he wants. Think of it from the dog prespective he does not know you are going to do it anyway.
With an entranched behavior the punishment is less effective especially if it is not consitently metered out. General speaking humans are more tolerant of such behavior early in the day and less at night. So in general what happen if the human ignores the behavior eary in the day they are actually inadverently rewarding the behavior because the dog eventual gets what he wanted. Later in the day the dog is punished and becomes confused. Such inconsistency is not likely to help the situation
The Second problem is know as an
Extinction Burt With entrenched behavior if they are ignored and sometime even punished they do not end with a wimper but go out with a bang. The dog will become even more adement louder, longer etc in trying to make what once worked work again. If you reward this behavior you just tregthen the idea if at first you do not succeed it was because you did not try long enough or hard enough.
The easiest solution is to reward the behavior. The reward must be delivered consitently just as in training any new behavior. The reward also must be something the dog does not want, i.e. a trip to the crate. An example would be any time the dog whines yipee he gets to go in his crate. The reward must come as soon as the dog starts not 5 minutes in. Soon the dog learn hey mom and dad are pretty stupid they think whining mean I want to go in my crate. The dog stops whining pretty quickly. The basic premise is more fleshed out in the following articles
You Won the Prize! and
Puppy Mouthing
I must say I have a different take on the notion of negative punishments. To begin with I don't call them that and think the semantics of them is a problem because of the attitude it creates. I do not want to take anything away from the dog as a punishment so that they will decrease the chance of the behavior happening. I Reward the dog. Just not with the Reward they would prefer.
...If a good friend wants to get you to go golfing every weekend and you hate golf you could tell them how boring it is and keep debating the point forever.
Or you could enthusiastically head to the course wearing the most outrageous outfit you can put together at Goodwill. Hit the ball in the opposite direction because it is so much fun watching everyone's expression (besides you were never much of a conformist) Talk constantly. Hug them and scream with joy at every stroke they make and express your amazement at their skills. Then tell them what a wonderful time you have golfing with them and can't wait to do it again. I bet your friend won't be available for another round for months.
The thing is it does not address the need of the dog to whine in the first place. As is often the case end one obnoxious behavior another obnoxious behavior often even worse than the first takes it place.
While not the case for every dog but often the obnxious behavior born out of excitment is cause for lack of a better term a lack of self control.
Examples include pulling on lead, rushing through doorways, jumping up while greeting. they can be addressed individually but if addressed comprhensively you can develop the dogs self control
TEACHING SELF CONTROL