Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Storing a PDF File as an Image?

Posted on 2014-11-18
6
Medium Priority
?
129 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
David L. Hansen earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 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