taking the battery off fixes nothing. it re sets the pcm. with in a few days time the pcm will see a fault and set the check engine light again.

once the light comes back on, go get it scanned and fix whats wrong. your car will thank you.