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

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...
 
R

Ray Booysen

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
 
K

Karl

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.
 
Joined
Oct 7, 2009
Messages
1
Reaction score
0
Convert VARBINARY TO pdf in VB.NET

Hello All,

I have inserted the pdf file in sql server using varbinary(max) datatype.
But I wanted to recreate the pdf from varbinary(max) datatype using .net or VB.

Please can anyone help me to resolve this problem.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top