When the battery is disconnected the DME resets, the only way to keep the settings is to attach a battery maintainer. When you go to reconnect the battery (assuming you let it reset), you can either drive the car and it will calibrate the DME over time, or as Steve pointed out you can make the DME calibrate itself all at once (versus over time) with the key.