Can a table store the actual file upload in SQL Server or just the path to the file name?

Posted on 2005-04-20
Last Modified: 2010-03-19
I want to add an upload file function to my page and store a copy of the file on my server.  I've done this many times by saving the path to the file in the database and saving the file to a folder on the server.  Is it possible to create a field in SQL Server that can hold the actual file or should I just keep using folders to store the files?  Thanks.
Question by:Ike23
    LVL 17

    Accepted Solution

    It is possible to store the file in the database as binary data, but its not really recommended unles syou have specific reasons to do so. It will probably be a little slower. Its harder to manage in some cases.

    LVL 28

    Assisted Solution

    Aside from the points made by Tacobell777, backing up your database will take longer because of the size of the files.  Backing up of the actual files will be easier if it is on a folder.

    Also, you can have the option of zipping the uploaded files to save space and unzipping it when the files are needed.  This can be done by your application as an added feature.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

    730 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

    16 Experts available now in Live!

    Get 1:1 Help Now