How to store documents and files on remote SQL server 2005

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
LVL 1
jjwarrAsked:
Who is Participating?
 
DhaestConnect With a Mentor Commented:
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
 
DhaestCommented:
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
 
jjwarrAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.