"Prevent" is not used by us in quite the same way. Here it means to go before. The Lord is going before David. He always goes ahead of His people.