Traditionally, ulcers, or sores in the lining of your digestive tract, were thought to be caused by too much spicy food, stress, or an anxious personality. We now know that most ulcers are probably due to infection with bacteria known as Helicobacter pylori.

Burning, cramping, or hungerlike pain in the stomach area, often one to three hours after a meal or in the middle of the night
Pain that gets better or worse with eating
Nausea or vomiting
Black, tarry, or bloody stools (which means the ulcer is bleeding)
Or you may have no symptoms.

An evaluation by your doctor can show if you have an ulcer and determine whether it was caused by H. pylori. Your doctor may ask you questions, examine you, and possibly do some tests. These may include:
A special x-ray called a barium upper gastrointestinal series, to help locate an ulcer. During the test, you drink a chalky liquid. This liquid helps the ulcer show up on the x-ray.
An endoscopic exam, done with a long tube passed through your mouth into your stomach, to give the doctor a closer look at your ulcer. Your doctor can also take a tissue sample to test for H. pylori.
Blood and breath tests are also available to show whether you have H. pylori in your digestive tract.
To kill H. pylori so your ulcer can heal, your doctor will probably prescribe antibiotics. Other ulcer medications may be prescribed as well. Usually, killing H. pylori will keep the ulcer from returning.