Catch with OBD-II...
Pulling the battery cable to "reset" the code sets another one - but you don't get a CEL for it. However, if you are subject to inspection, seeing that code (without seeing a new battery in place, for instance) will cause you to fail.
Also, OBD-II has two types of codes - a "soft" code indicates a malfunction, but you won't get a CEL with it. It's a non-critical component malfunction (that "Battery Disconnect within the last xx cycles" is a soft code.) You also have "hard" codes - these are considered crtical component failures or malfunctions, and you'll get a CEL for them. Of course, this usually means "critical" as in "increases emissions" - like the EVAP control code you get from a loose fuel cap.
Long story short - get a reader, and use is periodicially (about once a quarter should do.) You can not only see what "hard" codes are when you get a CEL/MIL, but also read "soft" codes that you wouldn't otherwise (but would probably fail you for inspection,) and be able to reset the ECU DTC properly once it's fixed. Most OBD-II readers for the hobbyist are well under $200, and they do tend to pay for themselves in short order.
Note - if you go to Autozone or similar to get codes read, chances are, they'll only be able to explain the "zero" series codes that are set by SAE. For instance, you can get powertrain codes in two broad categories - "P0" codes are set by SAE and standard across the industry. "P1" codes are set by the manufacturer, are therefore non-standard, and aren't something that a "standard" (read: droid-equipped) outfit would be likely to understand. And, the same "P1xxx" code could mean different things, depending upon the make of vehicle.
OBD-II does make more sense than OBD-I (makes sense - OBD-I was devised by CARB and CalEPA, OBD-II by SAE,) but there are still pitfalls you can fall into...