If your computer has a high-power USB port, it will charge. When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge, but only when the iPad is in sleep mode.
iPad: Charging the Battery, http://support.apple.com/kb/HT4060
If you've tried to fix this with multiple cables and multiple computers then it's possible that the USB port
On the pad itself has gone bad. Happened to me. Take it into an apple store or where you bought it. As long as there's no obvious damage, it's likely covered under 'manufacturers defects' and your device will likely be exchanged.
I took mine into best buy and they were going to send it away for repair but their computer said to just exchange it so I walked out with a new device.
You will lose any data since your last backup, but that's better than owning a doorstop.
Hi alberthern, yes I did resolve it but only recently. As I said, my problem was particularly odd because it would charge, but only if it was off. Even then charging took a long time. It would not charge while it was on, nor would it connect to the computer.
Of course checking the cables was one of the first things I did - even though my iPad came with two I also used a friend's and the results were the same. I reset the settings and did almost everything else I could think of.
I thought about deleting all the apps because I suspected the problem must be coming from one of them, but it's my son's iPad as well and I couldn't risk that if it didn't work, I'd have no way to connect to my iTunes to get his apps back. However one finally showed it's hand when I went to reset my clock, which had somehow shifted 15 minutes fast, and the app gave me a warning that I had tried to cheat the game. I deleted the game and wouldn''t you know, my iPad works now. To be honest I'm still pretty PO'd about it.