To keep the king's commandment - This sentence would be better translated, I keep the mouth of the king; I take good heed not to meddle with state secrets; and if I know, to hide them. Or, I am obedient to the commands of the laws; I feel myself bound by whatever the king has decreed.
In regard of the oath of God - You have sworn obedience to him; keep your oath, for the engagement was made in the presence of God. It appears that the Jewish princes and chiefs took an oath of fidelity to their kings. This appears to have been done to David, 2 Samuel 5:1-3; to Joash, 2 Kings 11:17; and to Solomon, 1 Chronicles 29:24.
Oath - A reference to the oath of allegiance taken to Solomon at his accession to the throne (the margin of 1 Chronicles 29:24).