Yes, those wives had a lot to do with his eventually turning away from God and joining his wives in his worship of false gods! David didn't marry foreign wives. But Solomon did. That to me, is one sign that Solomon didn't care about God's rules as much as his father - David did! Half-heartedness in serving God, is dangerous!
Interesting.
Did David care about God's rules when he committed adultery with Bathsheba and should have been put to death as a result?
Did David care about God's rules when he perpetrated the death of Uriah?
So we see that David broke the following blatantly
Deuteronomy 5:17-21
17 You shall not murder.
18 You shall not commit adultery.
21 You shall not covet your neighbor’s wife;
Then we find
1 Chronicles 21:1-7
The Census of Israel and Judah
(2 Sam. 24:1–25)
1 Now Satan stood up against Israel, and moved David to number Israel.
2 So David said to Joab and to the leaders of the people, “Go, number Israel from Beersheba to Dan, and bring the number of them to me that I may know it.”
3 And Joab answered, “May the Lord make His people a hundred times more than they are. But, my lord the king, are they not all my lord’s servants? Why then does my lord require this thing? Why should he be a cause of guilt in Israel?”
4 Nevertheless the king’s word prevailed against Joab. Therefore Joab departed and went throughout all Israel and came to Jerusalem.
5 Then Joab gave the sum of the number of the people to David. All Israel had one million one hundred thousand men who drew the sword, and Judah had four hundred and seventy thousand men who drew the sword.
6 But he did not count Levi and Benjamin among them, for the king’s word was abominable to Joab.
7 And God was displeased with this thing; therefore He struck Israel.
1 Chronicles 21:14-15
14 So the Lord sent a plague upon Israel, and seventy thousand men of Israel fell.
15 And God sent an angel to Jerusalem to destroy it. As he was destroying, the Lord looked and relented of the disaster, and said to the angel who was destroying, “It is enough; now restrain your hand.” And the angel of the Lord stood by the threshing floor of Ornan the Jebusite.
We know that David was a man after Gods heart, we know he messed up big time.
Yet eventually repented. He suffered the consequences of his sin and others did as well including his family.
David's advice to Solomon
1 Kings 2:1-5
David’s Instructions to Solomon
1 Now the days of David drew near that he should die, and he charged Solomon his son, saying:
2 “I go the way of all the earth; be strong, therefore, and prove yourself a man.
3 And keep the charge of the Lord your God: to walk in His ways, to keep His statutes, His commandments, His judgments, and His testimonies, as it is written in the Law of Moses, that you may prosper in all that you do and wherever you turn;
4 that the Lord may fulfill His word which He spoke concerning me, saying, If your sons take heed to their way, to walk before Me in truth with all their heart and with all their soul,’ He said, you shall not lack a man on the throne of Israel.’
David is saying walk in his ways, he doesn't say be obedient.
Is he saying be obedient or walk with God?
Is he telling him seek relationship with God. The same relationship that David & God had?
David messed up a lot but he always came back to God.
Jesus said "If you love me you will keep my commandments"
We obey out of love and not to be loved when it comes to God.
David didn't, Solomon didn't.
I think Solomon repented. His ways just like Davids and mine affect our relationship with God.
1 Kings 11:4
4 For it was so, when Solomon was old, that his wives turned his heart after other gods; and his heart was not loyal to the Lord his God, as was the heart of his father David.
Notice "to the Lord his God"
Finally
2 Samuel 7:12-17
12 “When your days are fulfilled and you rest with your fathers, I will set up your seed after you, who will come from your body, and I will establish his kingdom.
13 He shall build a house for My name, and I will establish the throne of his kingdom forever.
14 I will be his Father, and he shall be My son. If he commits iniquity, I will chasten him with the rod of men and with the blows of the sons of men.
15 But My mercy shall not depart from him, as I took it from Saul, whom I removed from before you.
16 And your house and your kingdom shall be established forever before you. Your throne shall be established forever.” ’ ”
17 According to all these words and according to all this vision, so Nathan spoke to David.
Ecclesiastes 12:13-14
13 Let us hear the conclusion of the whole matter:
Fear God and keep His commandments,
For this is man’s all.
14 For God will bring every work into judgment,
Including every secret thing,
Whether good or evil.