The purpose of this study is to determine whether AG-1749 (lansoprazole), once daily (QD), is effective in preventing the recurrence of gastric and duodenal ulcers in patients receiving long term treatment with nonsteroid anti-inflammatory drug, compared to gefarnate, twice daily (BID).