Wow, a month is a long time. Did he start with a virus? My son (2 1/2 now) has always had stomach issues and was actually hospitalized once around that age for dehydration. He had a virus last fall that started like the stomach bug but after a few days he seemed normal in other ways but would still vomit once a day for probably 10 days or so. I was told that for some kids, with low immune systems it may take them longer to get over the virus. He had also been on oral prednisone for a severe asthma attack previous to this which lowers their immune system. He did eventually stop vomiting probably around 10 days.
Anyway, I'm not sure if this helps but I would take the child to another doctor or maybe a specialist at this point. It seems rather long to be virus related.