Solved

Storing DOCs, PDFs, and HTML documents in SQL Server 2000 Database

Posted on 2008-06-11
2
298 Views
Last Modified: 2013-11-26
I need to store Word, Adobe PDF, and HTML documents into a SQL Server 2000 database. I was hoping someone could share an example of uploading and retrieving document images written in VB using Visual Studio 2005.
0
Comment
Question by:russell813
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 21759302
First, consider that loading images (and files in general) into a database is probably bad regarding the performance. If at all, you should store them in a separate database...

Besides that, you need to read about the .AppendChunk and .GetChunk to write/read to IMAGE (and TEXT) fields in SQL Server.
Another way to do this is store the file location in the database and simply place image files on the hard drive.  As far as removing the file just remove the record holding the location and then use the kill statement to delete the file off the hard drive.

Take a look at this code

Save/Retrieve Image From SQL Server Database Using Ado 2.5 Stream Object
http://www.freevbcode.com/ShowCode.Asp?ID=1802


HOW TO: Read and Write a File to and from a BLOB Column by Using Chunking in ADO.NET and Visual Basic .NET
http://support.microsoft.com/kb/317034/EN-US/
0
 

Author Closing Comment

by:russell813
ID: 31466107
Thanks I appreciate you feedback. I looked over the solution and it seems it will fit nicely into what I am planning.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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