please provide proper information before we can even help you.
We have no idea what piece of technology you are using. Seeing as how one of the tags is Windows XP and you are talking about a battery, I would have to assume a laptop. But which laptop?
Also, when you say your battery can only work when you connect a power cable, you do know that this has nothing to do with your battery.
Once connected to a power cable, your laptop will be powered directly from the cable and not the battery while the battery also charges.
Again, assuming that you are using a laptop and that the battery doesn't turn on when only using the battery, it could be because of a couple of things.
#1: Your battery is receiving a charge but your PC doesn't want...