There’s an unlimited EXP cheat if you don’t want to use your endless supply of Rare Candies. That’s why you shouldn’t keep it activated for too long.
If you keep the cheat on, your Bag and PC will rapidly fill up with Rare Candies, and you won’t be able to get other items. If not, you can enter the cheat and try again. The first item in either of the locations should be a Rare Candy. For both, you should deactivate them once you’ve finished getting Rare Candies. The next one asks that you check the nearest Pokemart instead. The first one requires you to activate the cheat and then looking at your PC in Pokemon Emerald.