Food poisoning/stomach virus

Emily • Married for over 2 years, TTC for over 1 year, 2 previous MMC, expecting my rainbow baby Sept. 2016! 💕
I'm 26 weeks and have had some sort of stomach bug for the last 24 hours. NOTHING will stay down. I think I'm starting to dehydrate because I have a headache and some lower back pain. Has anyone had a bug that lasted longer than 24 hours? I was hoping it would be over by now! I'm nervous that dehydration will affect the baby.