I went through this with my Inspiron 1150.
If the unit is no longer under warranty, some will suggest you get a new motherboard, but before you do that there are other things you should do. First, since you have the error message that your system cannot recognize the AC Adapter, replace the AC Adapter. If the battery charges now, you're fine, but if it doesn't, Buy a new battery, but again, if that doesn't work, there is one thing left- The DC Jack. On some models, Dell saves cost by using cheap DC jacks. I replaced the DC jack on my Inspiron 1150 and it has been charging batteries ever since.
The reason why Dells give the error message- "Cannot recognize AC Adapter" is because either the AC Adapter has failed or the DC Jack on the laptop has failed. There is circuitry built into the motherboard that keeps us from using any AC Adapter except the ones produced for Dell. When the board no longer recognizes the AC Adapter, that usually means that the DC Jack has failed but it's less stressful to replace the AC Adapter first. Replacing the Mainboard will solve the problem temporarily but the DC Jack on the new Mainboard is likely to fail as well because the ones Dell uses in some models are sub-standard. A note of caution- If you have no experience repairing PC's and using a soldering iron, you will want to get the assistance of an experienced PC repair tech who has experience soldering.
Here is a link to the website where I get all my Dell Parts. The prices are great and the quality of the parts is outstanding. They have everything you need:http://www.impactcomputers.com/dellp...000-parts.html