Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-06-11
2
Medium Priority
?
305 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
[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
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 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