Solved

Storing a PDF File as an Image?

Posted on 2014-11-18
6
97 Views
Last Modified: 2014-11-19
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!
0
Comment
Question by:BlakeMcKenna
  • 4
  • 2
6 Comments
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 40451349
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).
0
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 40451354
Your VB program can then use the path's string value (eg. using the IO namespace...ie. IO.File.Open).
0
 

Author Comment

by:BlakeMcKenna
ID: 40452292
I already know how to do this. This isn't related to my question.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 15

Accepted Solution

by:
David L. Hansen earned 500 total points
ID: 40452602
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.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40452876
Thanks David...that's more what I was looking for!
0
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 40452881
Glad to help Blake!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now