473,587 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Store and retrieve binary data (pdf doc etc) in sqlserver2005 using asp.net 2.0

Hi All,

I am working my way through the Personal Web Starter Kit from Microsoft
and understand how the storing of images in a database works, but I was
wondering if anyone could shed any light on how to store and retrieve
documents, such as a pdf or a word document, which need to be
downloaded to a clients computer and not just rendered on the screen as
is the case with the image scenario?

Please be aware that I am using C Sharp, although I'm relatively new to
it, so any examples would best suit me in C Sharp, thanks.

I have read that storing documents in this manner isn't exactly the
best way to do it as there's alot of overhead, but it's the way our
product has been designed, and this is what I need to do.

Thanks in advance...

Aug 14 '06 #1
2 1399
Karl wrote:
Hi All,

I am working my way through the Personal Web Starter Kit from Microsoft
and understand how the storing of images in a database works, but I was
wondering if anyone could shed any light on how to store and retrieve
documents, such as a pdf or a word document, which need to be
downloaded to a clients computer and not just rendered on the screen as
is the case with the image scenario?

Please be aware that I am using C Sharp, although I'm relatively new to
it, so any examples would best suit me in C Sharp, thanks.

I have read that storing documents in this manner isn't exactly the
best way to do it as there's alot of overhead, but it's the way our
product has been designed, and this is what I need to do.

Thanks in advance...
It is exactly the same manner. The only difference would be setting the
content type differently on the page but its hard to say without knowing
how you're currently doing it. Can you post some sample code?

Thanks
Ray
Aug 15 '06 #2
Hi Ray,

Thanks for your reply.

There really is too much code to put here as it spans several pages and
uses ObjectDataSourc e objects and various classes and handlers.
However, if you download the Microsoft personal web starter kit and
take a look at what they've done, youll see the road Ive gone down.

http://msdn.microsoft.com/vstudio/ex...t/default.aspx

I know there's more than one way to skin a cat though and would
appreciate any assistance.
Ray Booysen wrote:
Karl wrote:
Hi All,

I am working my way through the Personal Web Starter Kit from Microsoft
and understand how the storing of images in a database works, but I was
wondering if anyone could shed any light on how to store and retrieve
documents, such as a pdf or a word document, which need to be
downloaded to a clients computer and not just rendered on the screen as
is the case with the image scenario?

Please be aware that I am using C Sharp, although I'm relatively new to
it, so any examples would best suit me in C Sharp, thanks.

I have read that storing documents in this manner isn't exactly the
best way to do it as there's alot of overhead, but it's the way our
product has been designed, and this is what I need to do.

Thanks in advance...
It is exactly the same manner. The only difference would be setting the
content type differently on the page but its hard to say without knowing
how you're currently doing it. Can you post some sample code?

Thanks
Ray
Aug 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3387
by: Lars Behrens | last post by:
Hi there! For a web project I need a little expert help. I don't have written much code yet, just been fiddling around a bit, testing and planning. The web site will have a submission page for attendants of a congress. In a form the user will submit name, mailadress etc. and I plan to store the data in a list of dictionaries: People =
3
13370
by: Karen Grube | last post by:
Hi! Each week, we receive a two-page PDF file from UPS along with a separate flat file (a CSV) The PDF file contains the overview of our weekly invoice and the CSV contains the details of each shipment. I download the file from UPS and then use DTS to import the data into SQL. At that point, I have a Crystal report that prints what...
8
3290
by: emanshu | last post by:
Hi, i am storing data read from some file (text,pdf,gif...) into std::list using push_back function available for list. and my list type is string.( std::list<string> mylist) after storing whole file in list i am trying to writing the data stored in list into new file of same format. if the source file is text then destination new file...
2
3515
by: kabin selvam | last post by:
Hi, my scenario is like this, I have my document (word.or excel or pdf) stored a s a binary value(image datatype) in database, I need it to convert back into thedocument and save it as the file in my local system, Is there any way of retrieving the image datatype and store it as a file in our local system in c#
5
8036
by: AlexCDM | last post by:
Greetings; I'm a (young) .NET developer and I have this problem: I'm building an application (with C#) that creates PDF files. To display a JPEG image within the PDF I need to copy the data from the JPEG file to the PDF (intended as a text file); I've tryied with the FileStream class, but it won't work, maybe bacause, somehow, the binary...
5
10619
by: moondaddy | last post by:
I'm caching a dataset in an asp.net session variable to hold a user's data. one data item I need to store is an image the user uploaded. My problem is that I don't know how to get the image into the dataset because I don't know what datatype to set the dataset column and then set this image to. I saw an example where someone defended a...
0
1841
by: AirYT | last post by:
Hello, Here's a quick explanation & problem: i have an ASP (iis v5.0) application that generates a pdf file and this file is saved to the server. it is saved in a location not available to web users. i have an asp script (below) that sends the pdf file to the user as a binary stream. So that the user specifies which file to upload, the...
4
4219
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind. I need to be able to print shipping labels from a web page within this application. The shipping label data is pulled from a 3rd party application...
1
2036
by: nkoriginal | last post by:
hello everybody: I've a page where upload .doc and .pdf to my DB (sql 2005), I tried many times to retrieve that information but I can't do it. My idea is: an ASP page with links, when somebody click that link, retrieve the .doc or .pdf from the DB. I've an unique ID per line. so I can know what row I want to retrieve. when the user click...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.