The following Action Replay code sets all Individual Values (IVs) to 31 (maximum) for a Pokémon in the US version of Pokémon Diamond:
94000130 FFFFFFFF D2000000 00000000
Requirements: Action Replay DS device or R4 flashcard with Action Replay functionality.
Caution: Using external cheat devices may corrupt save data, violate terms of service, and is considered cheating by many players. Use at your own risk. Always back up your save file first.