Your dog may be experiencing Irritable Bowel Syndrome. Consult with your Vet, and ask them for some Metoclopromide which accelerates the emptying of the stomach. Also ask for the proper dosage of an acid blocker such as Cimetidine (generic sold over the counter). If this helps then you have a quick fix. If not then you will need follow up diagnostics.