Dogs will eat just about anything but they can also get a stomach virus, just like humans. A dog that has eaten something foreign will often suffer from stomach upset. Even if your dog eats the same food each day at home, he can somehow manage to sneak in something from the park. It's not uncommon for dogs to eat grass, plants, and bones. If your dog is on a special diet and eats something he's not used to, that too, can cause an upset stomach.
Give your dog Gatorade instead of water to replenish his fluids and provide electrolytes. Dehydration will occur if your dog continues to vomit and have diarrhea so be sure to give him Gatorade around the clock.
Cook white rice to help settle your dog's stomach. Make enough white rice for the entire week and feed your dog only rice during the first few days. Put the rice in a bowl full of Gatorade to get him to drink and eat at the same time.
Add ground beef or turkey to your dog's diet if the vomiting and diarrhea cease. Boil the meat like you would spaghetti and drain it thoroughly to remove all of the fat. Pat dry and give your dog ¼ cup mixed with a small amount of rice as a meal replacement. Feed your dog this mixture up to three times a day if he can handle it.
Take your dog to the veterinarian if the symptoms continue. If left untreated, a stomach virus can turn into pancreatitis. The vet will take a stool sample to look for blood and worms, and will prescribe antibiotics to clear the infection. In some cases an X-ray will be necessary.