Spell resistance and holding the charge

If you are holding a charge and you attack a creature with SR and hit it, but fail to overcome the SR check, does the spell dissipate or do you continue to hold the charge and just not affect the creature?