Hold your old key together with your new key and start the car. After a few seconds turn it off, remove the old key and restart it. If it starts, the car would recognize your new key.
Don't know the code error but you can take it to your nearest parts store and they should be able to hook it up to there code scanner. They normally will do it for free. I would call them first to be sure they offer this test. Auto Zone will usually do it as well as Napa. I hope this helps.
Check on the passenger door for a switch. If you have a four door check the rear passenger door It should be on the inside edge of the door or on the panel by the handle and door lock switch. It could also be on the drivers side door. Rich