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

Discussion in 'ASP .Net' started by Karl, Aug 14, 2006.

  1. Karl

    Karl Guest

    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, Aug 14, 2006
    #1
    1. Advertising

  2. Karl

    Ray Booysen Guest

    Re: Store and retrieve binary data (pdf doc etc) in sqlserver2005using asp.net 2.0

    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
     
    Ray Booysen, Aug 15, 2006
    #2
    1. Advertising

  3. Karl

    Karl Guest

    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.


    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
     
    Karl, Aug 15, 2006
    #3
  4. Karl

    saloniSona

    Joined:
    Oct 7, 2009
    Messages:
    1
    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.
     
    saloniSona, Oct 7, 2009
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S2VuIEFkZW5pamk=?=

    SQLServer2005 9.00.1314.06 Sep 2 2005 21:10:31Frameworkversion 2.0

    =?Utf-8?B?S2VuIEFkZW5pamk=?=, Sep 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    460
    =?Utf-8?B?S2VuIEFkZW5pamk=?=
    Sep 19, 2005
  2. Mark Olbert

    Ridiculously Slow SqlServer2005 Sorting?

    Mark Olbert, Dec 23, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    416
    Mark Olbert
    Dec 24, 2005
  3. Matt
    Replies:
    3
    Views:
    536
    Tor Iver Wilhelmsen
    Sep 17, 2004
  4. =?Utf-8?B?ZGF2aWQ=?=

    How to store/retrieve binary data in/from SQL server DB?

    =?Utf-8?B?ZGF2aWQ=?=, Jul 6, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    10,163
    sloan
    Jul 7, 2006
  5. Vijaya Lakshmi
    Replies:
    1
    Views:
    576
    Thomas Phaneuf
    Aug 9, 2007
Loading...

Share This Page