Then the mystery was revealed to Daniel in a vision of the night. Then Daniel blessed the God of heaven.
Here it may be gathered, that Daniel did not vacillate nor pray with his companions through any doubt upon his mind. For that sentence of James ought to come into our memory, namely, Those who hesitate, and tremble, and pray to God with difference, are unworthy of being heard.
Daniel was condemned to death with all the magicians, though he had not even been summoned, the sword of tyranny devours one as well as another. Yet by prudence toward men and prayer toward God he found favour; in both he prevailed, and so was enabled to answer with counsel and wisdom.
AI summary
Commenting on Daniel 2:14-23
Then was the secret revealed unto Daniel in a night vision,.... That is, after Daniel and his companions had importunately sought the Lord by prayer, the secret of the king's dream, and the interpretation of it, were made known to Daniel, and to him only; he being the person designed in Providence to be raised to great honour and dignity by means of it; this...