When was the Bible formally declared to be inerrant and/or infallible? Fundamentally*, an inerrant Bible is one without errors and an infallible Bible is one that cannot have errors, as David Stratton pointed out in his answer. As for the Roman Catholic Church, all of its doctrines are infallible, so presumably, they believe the Bible is infallible as well.

My question is: when and why was inerrancy/infallibility formally declared? I'm looking for any combination of these four sources:


an Old Testament text declares itself or another OT text to be inerrant/infallible,
a New Testament text declares itself or another NT text to be inerrant/infallible,
one or more early church authors declare some OT/NT text to be inerrant/infallible, or
the closed canon (with or without the Deuterocanon) is declared inerrant/infallible by the Church, before or after the Great Schism.


I'm most interested in writings from the early church fathers, and 2 Timothy 3:16 is allowed in the answer only if the link between "God-breathed" and "infallible"/"inerrant" is shown in a clear and direct way. Also, declarations of inerrancy/infallibility should apply to the whole text, not just God's directly-spoken words.



*Stealthy or lame, take your pick.
A biblical case for inerrancy can certainly be made on the basis of passages like 2 Timothy 3:16 and 2 Peter 3:16, but these are limited in that they do not obviously refer to the entire Bible, both Old and New Testaments.  So to address this question it's best to turn to the writings of the early fathers.

Clear statements of the truthfulness and perfection of the Bible appear very early.  Here are several examples:


Clement of Rome (?–99)  


  Look carefully into the Scriptures, which are the true utterances of the Holy Spirit. Observe that nothing of an unjust or counterfeit character is written in them. (Epistle to the Corinthians, chapter 45.  In chapter 47 he cites Paul as an inspired author)

Justin Martyr (100–165)  


  I am entirely convinced that no Scripture contradicts another (Dialogue with Trypho, chapter 65)

Irenaeus (?–202) 


  the Scriptures are indeed perfect, since they were spoken by the Word of God and His Spirit (Against Heresies, 2.28.2)

Tertullian (155–240) 


  The statements, however, of holy Scripture will never be discordant with truth. (A Treatise on the Soul, chapter 21)



The definition of "Scripture" for these authors varied to some extent, but later fathers, like Augustine, more carefully emphasized the importance of defining a canon and gave even more explicit statements of inerrancy:


  I have learned to yield this respect and honour only to the canonical books of Scripture: of these alone do I most firmly believe that the authors were completely free from error. (Letter 82)