I want to save pdf file in database. I am searching what is the best way to save for pdf file in database. I am confusing among varbinary(max) and image. What should i use?
What is the best way to store a pdf file in Database?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 9, 2017, 1:43 AM EDT
My opinion is that you do not really want to store the PDF in a DB. At the risk of arguing semantics, you probably want to store either the contents of the PDF, or the physical location of the PDF. Which one you choose to store depends on what you are going to do with the PDF.
If you are simply going to echo the PDf back to someone when requested, you are better off storing the physical location in a normal varchar field, and storing the PDF in a file system.
Ramesh Singh81 reputationPosted Jul 19, 2017, 6:16 AM EDT
Manish KumarRank #1,622 · 956 reputationPosted Jul 19, 2017, 11:33 PM EDT