Vomiting in dogs may simply be due to something he ate that upset his stomach. Or it could be the result of poisoning, a side effect of drugs, failed kidneys, pain in some other part of your dog (such as the pancreas or brain), a side effect of surgery, or severe constipation. If vomiting persists, it's important to take him to the vet to establish the underlying cause.
But there are things you can do in the initial period to help ease his stomach and prevent dehydration.
* Keep his water bowl filled. If he is unable to keep water down, try giving him ice cubes to lick. He will do this more slowly than drinking water, and should hopefully keep his fluid level fine. If he is still dehydrated, you could try giving him an enema, or take him to the vet's for rehydration.
* Fast him for 24 hours. He'll need a period of time to get his stomach to settle down.
* Make sure he doesn't have access to the toilet bowl. Keep the toilet seat down, or the door to the bathroom closed. Ideally, this should be done all the time so he doesn't pick up any bugs from it. Apparently it's good feng shui too :-)
* You could try using kaopectate. Use 1 teaspoon for every 10 pounds body weight of your dog. Your dog won't like the taste but it does work. But if vomiting is persisting, it's best to take him for a check up. If it is a symptom of an underlying condition, stopping the symptoms, will not make your dog healthier.