I am havingt ulcer too with liver cirrhosis.
Dr.Prescribed Omeprazole 20mg 2 times daily 15 mins before meal.
Also he advised to avoid fried food,junk food,beef,mutton,sour,milk & milk item,also to avoid some foods which my stomach can't tolerate.
A healthy & hygene life can give you good & healthy stomach.
Also please ask your doctor to make a pathology test called H.PYLORI the bactoria are responsible for ULCER.
If you get positve he will advice you a combined therapy such a Claritate+amoxicilin+omeprazole.
Best of luck
saife