Drinking fluids is usually sufficient for mild dehydration. It is better to have frequent, small amounts of fluid (using a teaspoon or syringe for an infant or child) rather than trying to force large amounts of fluid at one time. Drinking too much fluid at once can bring on more vomiting.
Electrolyte solutions or freezer pops are especially effective. These are available at pharmacies. Sport drinks contain a lot of sugar and can cause or worsen diarrhea. In infants and children, avoid using water as the primary replacement fluid.
Intravenous fluids and hospitalization may be necessary for moderate to severe dehydration. The doctor will try to identify and then treat the cause of the dehydration.
Most cases of stomach viruses (also called viral gastroenteritis) tend to resolve on their own after a few days.