The best way to keep the ham from drying out is to cook it in a slow cooker with some liquid, like Dr. Pepper. You could also cook the ham in a covered roasting pan with some water or broth in the bottom. If you're cooking the ham on the stovetop, ensure you add enough liquid to cover it and watch it carefully, so it doesn't boil dry. Basting the ham with the pan juices or a little additional liquid will also help keep it moist.