How to upload pdf file in sql Database using Filestream as Datatype

Posted on 2011-05-04
Last Modified: 2012-05-11
i want to upload/save  a pdf file in sql database

 I used Image as datatype
and found the file is stored as
binary.But storing a large pdf
file can overload the database
due to its size.
Can there is any other process to do that
to minimize the server load.
I also want to restore the file and to read it.

Please provide me the answer
stepwise. and code to do this
Question by:code_me
    LVL 16

    Expert Comment

    by:Imran Javed Zia
    In a case where you don't want to store files in the server you can do the following

    Add a column that may store the path in relalted table.
    When going to save file, save the file to some location on file system.
    and when you get the data then read that file and add to record set.

    alternatively you can use some file source as http location or ftp location to get the files.

    LVL 69

    Accepted Solution

    LVL 1

    Author Closing Comment

    thanks for the link

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, 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…

    755 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

    21 Experts available now in Live!

    Get 1:1 Help Now