I have deicing cables on my house and they work very well if installed properly. They will prevent formation of ice dams and will also keep your gutters from freezing. You can get them at the usual places: HD, Lowes and many hardware stores.
Ted is correct that a properly designed and insulated roof shouldn't get ice dams, but many houses have such poorly designed roofs that no amount of insulation or ventilation will prevent dams from forming, my house being one of them.
If you get a dam, don't use salt on it. It's not only bad for your gutters; the salt can get to the nails in your roofing. A trick I'm told works well (I haven't tried it) is to fill a ladies nylon hose with calcium chloride and place it across the dam. This will cut a channel through the dam and allow water to drain out. The dam itself isn't the problem, it's the water that backs up behind it.