?
Solved

How to store documents and files on remote SQL server 2005

Posted on 2008-11-18
5
Medium Priority
?
1,178 Views
Last Modified: 2013-11-26
Hello all
I have been trawling the web looking for articles and tutorials on "How to store documents and files on remote SQL server 2005" but have found nothing of any relevance so i have decided to post my question to you the experts. I have an intermediate to advanced knowledge of sql and vb.net 2005/2008. I want to be able to store all types of files on the sql server through the program i have made. all the connections are setup and working and I am currently storing images and text remotely into the server through my program but i dont know how to store actual documents into the database like .mp3 , .doc , .pdf etc. i have an ingcling that i have to convert the documents to binary then store the binary in the database then when i want to read it i then rebuild the binary back into a document. But i don't have a clue how to do this  can you please help.
Cheers
John
0
Comment
Question by:jjwarr
  • 3
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22983987
Storing Binary Files Directly in the Database Using ASP.NET 2.0
http://aspnet.4guysfromrolla.com/articles/120606-1.aspx

Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0
http://www.codeproject.com/KB/database/Store_and_manipulat_BLOBs.aspx

Storing and Retrieving Image (or documents)  in SQL Server
http://chiragrdarji.wordpress.com/2007/03/05/storing-and-retrieving-image-in-sql-server/

Storing Binary Data to Database using ASP.NET 2.0
http://www.beansoftware.com/ASP.NET-Tutorials/Binary-Files-To-Database.aspx

Store audio in Sql Server 2005 and retrieve it and play it in windows application .net
http://www.codeproject.com/KB/database/AudioInSQLServer.aspx
0
 
LVL 1

Author Comment

by:jjwarr
ID: 22987062
thanks for quick response and i have read all these before and they are all asp.net related and i mainly want to to store documents and exe files
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 22988774
The easiest solution will be to save them into a directory on your filesystem, and just store the filepath and filename into the database

How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET
http://support.microsoft.com/kb/308042
(I wouldn't recommend using BLOB's. They're slow and very fidely to code for. If you ever need to store files, I'd alwyas recommend the filesystem. Much more easier to manage. Just store the filename in the database.)

Although the article above refers to image files, the concept for storing doc files is the same.
Doc files will be saved into the database as blob data in the same way as image files are.
The important point to understand in the article above is the way in which the FileStream object is used to save and retrieve and the files.  

0
 
LVL 53

Expert Comment

by:Dhaest
ID: 22988789
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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
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. …

862 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