Solved

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

Posted on 2008-06-11
2
295 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

20 Experts available now in Live!

Get 1:1 Help Now