view images from a database

Discussion in 'ASP .Net' started by sugar44, Aug 8, 2006.

  1. sugar44

    sugar44 Guest

    Hi. Ever since i've upgraded to 2.0, I can no longer view my images.

    it fails at the line of code:

    bmpFile = New Bitmap(stmFile)

    with an error message "Parameter is not valid"


    here's the code:

    _______________________________


    Dim bmpFile As Bitmap
    Dim stmFile As New MemoryStream
    Dim objWriter As New BinaryWriter(stmFile)

    While myReader.Read

    objWriter.Write(myReader("LG_img_data"))
    bmpFile = New Bitmap(stmFile)

    page.Response.ContentType =
    myReader("LG_img_contenttype")
    Dim thisformat = bmpFile.RawFormat
    bmpFile.Save(page.Response.OutputStream,
    thisformat)
    End While

    ___________________________________


    has anyone run into this issue?
     
    sugar44, Aug 8, 2006
    #1
    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. VB Programmer
    Replies:
    1
    Views:
    605
    VB Programmer
    Jul 10, 2003
  2. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    Icon View and list View in ASP.NET

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Mar 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    511
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Mar 7, 2005
  3. Luqman
    Replies:
    2
    Views:
    3,825
    Luqman
    Feb 1, 2006
  4. Jimmy
    Replies:
    0
    Views:
    513
    Jimmy
    Mar 15, 2007
  5. Parthiv Joshi
    Replies:
    1
    Views:
    709
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page