You can't worship God and commit adultery. The closer you draw to God in prayer, the more strength you'll have to resist adultery.