Solved

Storing a PDF File as an Image?

Posted on 2014-11-18
6
92 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
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…

743 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

9 Experts available now in Live!

Get 1:1 Help Now