Storing a PDF File as an Image?

BlakeMcKenna
BlakeMcKenna used Ask the Experts™
on
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!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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).
Your VB program can then use the path's string value (eg. using the IO namespace...ie. IO.File.Open).

Author

Commented:
I already know how to do this. This isn't related to my question.
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

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.

Author

Commented:
Thanks David...that's more what I was looking for!
Glad to help Blake!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial