As my family doctor once explained to me, spicy food will not harm your stomach. It may upset it for awhile but no permanent damage will be done.
I'd actually understood hot, spicy foods to help kill off the bacteria that causes most ulcers. So, far from it causing ulcers, it's sort of protective. If you already have an ulcer and don't know, it'll announce itself very clearly though.