Your dog may whine while riding in the car because he has never learned to relax. If he only rides in the car infrequently and his destination is always the veterinarian, it makes sense that hopping in the car could make him nervous. Back up a few steps and work with your dog when you aren't under the pressure of an impending car ride. You should be able to convince your pup he has no reason to whine.
Feed your dog in the car. If he is extremely nervous about riding in the car, you may even have to work up to this, feeding him beside the car and gradually moving the dish into the car when he relaxes. Don't go anywhere, just sit with him while he eats.
Hang out in the car without driving. Open all the doors, let him climb through the car, sit in the backseat and feed him treats and pet him. You want him to look forward to getting into the car.
Take short rides with positive destinations. Your first ride may only be to the end of the block, where you get out, give your dog a treat and take him for a short walk, hop back in the car and return home. While that may not seem like much to you, it is exactly the type of trip your dog needs to build his confidence and calm his anxiety.
Explore the neighborhood. As your dog becomes more confident in the car, continue taking him on frequent car rides to different locations. You may think he is cured, but without regular exposure to the positive aspects of riding in the car, he may quickly revert to his bad habits.