Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm following an example to display images saved in the database..

 

Not sure why I get "invalid parameter used" on this line:

bmpFile = New Bitmap(stmFile)

 

--- Here's what i have..any ideas?

 

Dim bmpFile As Bitmap

Dim stmFile As New MemoryStream()

Dim objWriter As New BinaryWriter(stmFile)

...

cnn.Open()

Dim dr5 As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)

 

 

While dr5.Read

objWriter.Write(dr5("ole_data"))

bmpFile = New Bitmap(stmFile) 'THIS LINE

 

Response.ContentType = "application/msword"

.....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...