view images from a database

S

sugar44

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?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top