2 Timothy
3:
14 But you, remain faithful to what you have learned and believed, because you know from whom you learned it,
15 and
that from infancy you have known (the) sacred scriptures, which are capable of giving you wisdom for salvation through faith in Christ Jesus.
16
All scripture is inspired by God and is useful for teaching, for refutation, for correction, and for training in righteousness,
We read that Paul is claiming that all scripture is inspired by God. However, what scripture is he actually referring to? Some of you might say the whole bible, but let me ask: Was the whole bible available at that time? In other words was there anything else that was written and added to the bible later that was considered God's scripture also?
If you use this verse alone then it is being taken out of context obviously. However, the preceding verses should be included to understand what Paul really meant when he said that.
that from infancy you have known (the) sacred scriptures
As you can see, Paul could be referring to the scripture that his student has. But anyway, you should realize that the whole Bible was not complete when that letter was written. Paul was not telling Timothy that Timothy knew from infancy about books which are not yet written, was he?
The approximate date given for the writing of 2 Timothy is the year 65 A.D. However if we look at the dating of some other material we find this:
John 98 A.D.
1 John 98 A.D.
2 John 98 A.D.
3 John 98 A.D.
The above information is taken from:
http://www.nccbuscc.org/nab/bible/
So as we can see Paul is not referring to a scripture which has not been written yet. Furthermore, we can clearly see that Paul was referring to the scripture that Timothy already had.
So, the only option we are left with here is that Paul was referring to the Old Testament, but now we are faced with another question.