As Larry said, many modern vehicles have an anti-theft feature in their radios which "locks" them up if the power is cut....such as when they are stolen...but also when changing batteries or if the battery goes dead. If you're the original owner, the radio "unlock" code should have been given to you or set when you bought the vehicle...the original selling dealer may have a record of it as well. If not or if you lost it, any dealer can get it for you...usually for a small fee...or this site offers to do it also....small fee.
http://www.radio-code.com/
A device like this one keeps the computer or radio from losing memory when swapping batteries.
http://www.amazon.com/CTA-Tools-Computer-Memory-Saver/dp/B000GKD5Q0