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

  • Thread starter Thread starter Karl
  • Start date Start date
K

Karl

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...
 
Karl said:
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
 
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/express/vwd/starterkit/default.aspx

I know there's more than one way to skin a cat though and would
appreciate any assistance.
 
Back
Top