Good answers Poisonshady313, but I disagree. I think it's enough for the moshiach to be a genetic descendant of David.
I've always been very respectful of my Jewish friends and their beliefs so please don't get me wrong, however, I've never bought into the whole Nathan/Solomon thing quite frankly. It's David whom God was concerned about. This subject can quickly snowball into an epic event and I'm not after a long-winded debate so I found a
link to some reasoning that (loosely) approximates what I think, if anyone is interested. If someone wants to post a counter link be my guest.
The tribe that was given to Solomon's son, for David's sake, was the tribe of Judah, the tribe the Messiah must come from.
Consider also this promise to David:
I shall raise up after you your offspring who will issue from your loins, and I shall make his kingdom firm. He shall build a Temple for My sake, and I shall make firm the throne of his kingdom forever. I shall be a Father unto him and he shall be a son unto Me, so that when he sins I will chastise him with the rod of men and with afflictions of human beings. But My kindness will not be removed from him as I removed it from Saul, whom I removed before you. Your dynasty and your kingdom will remain steadfast before you for all time; your throne will remain firm forever.
II Samuel 7:12-16
This pretty much locks in Solomon as the guy.
footnote for 7:14 (I shall be a Father...)
I will chastise him as a father would a son, but not too severely, never abandoning My affection for him and never abrogating My promise concerning the permanence of your dynasty.
Whatever wrong Solomon was guilty of, it wasn't enough to rip away the Messianic lineage from him... because for his father's sake, his son was given Judah, the tribe of the Messiah.
Israel as a whole was also given conditional promises to remain God's people.... or were they? Consider the long list of curses in Leviticus for disobedience.... and then consider this verse:
Leviticus 26
43. ...This was all in retribution for their having despised My ordinances and in retribution for their having rejected My statutes. 44. But despite all this, while they are in the land of their enemies, I will not despise them nor will I reject them to annihilate them, thereby breaking My covenant that is with them, for I am the Lord their God.
45. I will remember for them the covenant [made with] the ancestors, whom I took out from the land of Egypt before the eyes of the nations, to be a God to them. I am the Lord.
Despite whatever conditions God set for Solomon, the merit of David prevented Solomon from losing his eternal kingdom, which will materialize again in Solomon's descendant, the Messiah.