?
Solved

Storing Word Documents in SQL Server

Posted on 2010-11-12
4
Medium Priority
?
196 Views
Last Modified: 2012-05-24
I am aware that the advised method of doing this is to store the documents on the file system and use SQL for the file information.  Aside from this, I'd like to store a copy of the document in SQL Server itself.  I have no problem getting the files into SQL, but am not sure how to write them back out to the hard drive so that the exported file is essentially identical to the original file.

If you can gives specifics, I'd really appreciate it, thanks.

-Mari
0
Comment
Question by:Mariyam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:Epitel0920
ID: 34124731
You should use the image data type. There you can store .pdf, .doc, or anything like that
0
 
LVL 4

Accepted Solution

by:
Amgad_Consulting_Co earned 1400 total points
ID: 34124747
Hi,

if you are working on SQL server 2008 you should check the filestream feature in it, see this links for more: http://technet.microsoft.com/en-us/library/bb933993.aspx   .

However, if you are using older version you should store the files as binary files in binary fields, for how to and limitations see this:
1. http://chiragrdarji.wordpress.com/2007/08/31/storing-and-retrieving-docpdfxls-files-in-sql-server/
2. http://msdn.microsoft.com/en-us/library/ms188362(SQL.90).aspx






0
 
LVL 15

Expert Comment

by:AmmarR
ID: 34124986
Why dont you consider Sharepoint
its perfect for storing documents

but if you want to do it with sql directly

check out this post
http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/0fb5fd05-3eb5-4568-9e2a-fd9ba5ed5a3e

it has useful links

http://www.codeproject.com/KB/database/Store_and_manipulat_BLOBs.aspx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34125508
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

766 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