ado stream write

Discussion in 'ASP General' started by Meelis Lilbok, Dec 3, 2008.

  1. Hi

    Im tryng to send binary stream to response.binarywrite

    problem is when i use ADO Stream Write method then it does not work.
    Response.BinaryWrite sends ASP page content not the stream bytes.
    When i use LoadFrom file, all works fine.





    With oAs
    .Type=1
    .Open
    .Write oRs.Fields("content").Value
    '.LoadFromFile("c:\download\ar.pdf")
    End With


    Any ideas why using Write method does not work?

    Br
    Mex
     
    Meelis Lilbok, Dec 3, 2008
    #1
    1. Advertising

  2. Case closed!

    After write method, you must set the oAs.Position=0


    Thx;
    Mex




    "Meelis Lilbok" <> wrote in message
    news:...
    > Hi
    >
    > Im tryng to send binary stream to response.binarywrite
    >
    > problem is when i use ADO Stream Write method then it does not work.
    > Response.BinaryWrite sends ASP page content not the stream bytes.
    > When i use LoadFrom file, all works fine.
    >
    >
    >
    >
    > With oAs
    > .Type=1
    > .Open
    > .Write oRs.Fields("content").Value
    > '.LoadFromFile("c:\download\ar.pdf")
    > End With
    >
    >
    > Any ideas why using Write method does not work?
    >
    > Br
    > Mex
    >
     
    Meelis Lilbok, Dec 3, 2008
    #2
    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. nita
    Replies:
    1
    Views:
    879
    Saravana
    Nov 20, 2004
  2. ronaldlee

    Transfer ADO Code to ADO.NET

    ronaldlee, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    465
    Kevin Spencer
    Dec 17, 2004
  3. Replies:
    0
    Views:
    1,320
  4. Navin
    Replies:
    1
    Views:
    704
    Ken Schaefer
    Sep 9, 2003
  5. Meelis Lilbok

    Problem with ADO Stream write

    Meelis Lilbok, Dec 3, 2008, in forum: ASP General
    Replies:
    0
    Views:
    105
    Meelis Lilbok
    Dec 3, 2008
Loading...

Share This Page