473,513 Members | 2,605 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 1396
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 ObjectDataSource 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
3384
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...
3
13355
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...
8
3283
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...
2
3509
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...
5
8028
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...
5
10611
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...
0
1833
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...
4
4199
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....
1
2032
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...
0
7160
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...
0
7537
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5685
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,...
1
5086
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...
0
4746
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...
0
3233
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...
0
1594
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 ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.