Storing a PDF File as an Image?

I'm saving a PDF file in a SQL Server DB. The column in the Table is defined as varbinary(MAX). I was wondering if the PDF can be stored as an Image DataType? If so, which is more efficient to do? Is there a better way altogether?

If you could provide a code example in VB.Net, I would appreciate it!

Thanks!
BlakeMcKennaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David L. HansenCEOCommented:
I usually just store the files location in a regular varchar column. Just be sure to store the full path (the full UNC is of course preferable).
David L. HansenCEOCommented:
Your VB program can then use the path's string value (eg. using the IO namespace...ie. IO.File.Open).
BlakeMcKennaAuthor Commented:
I already know how to do this. This isn't related to my question.
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

David L. HansenCEOCommented:
You can use varbinary to hold images. If you want your PDF's to be stored as some other type of image (say Jpeg) they will, of course, need to be converted to that format before placing them in the database.

If the images are very large then my previous comments are a better way to go.  See this article.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BlakeMcKennaAuthor Commented:
Thanks David...that's more what I was looking for!
David L. HansenCEOCommented:
Glad to help Blake!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.