The problem with my car, a 2000 Toyota, is that the fob receiver is broken, and I can't get the system to go into programming mode. It also would drain the battery. I bought a second hand one from Ebay, (40 instead of 350 dollars) and it appears to also be broken, in a different way. It doesn't drain the battery AT ALL (even though normally some current has to be used waiting for the driver to push the button on the fob)
So it's possible that another part in the car is preventing the key from getting programmed, though of course I'm not saying that's what' happening.