I agree you shouldn't give your cat only dry food. This will increase his chances of crystals and stones forming in the bladder, which can be serious to the point of surgery.
It's hard to say what causes gastro sometimes in cats. Maybe it was just a fluke, but shouldn't stop you from feeding canned!