• Announcements

Archived

This topic is now archived and is closed to further replies.

Recommended Posts

This is my code to retreive a image from a database, for some reason the image.fromfile... keeps the file open after i load it, so i can''t delete it. If i can''t delete it (And because its still open) i can''t load hte next image from the database.
            If rcs.Fields("sig").Value Is System.DBNull.Value Then
PictureBox1.Image = Nothing
Exit Sub
End If

strStream.Write(rcs.Fields("sig").Value)

strStream.Close()

PictureBox1.Image = Image.FromFile("C:\sTemp.bmp")

Kill("c:\stemp.bmp")


Share on other sites
Heh, uh, why are you creating the temporary file in the first place? Why not just set the image from the stream directly?

How appropriate. You fight like a cow.

Share on other sites
because image.fromstream takes an io.stream and im using adodb.stream, i''ve tried

• Partner Spotlight

• Forum Statistics

• Total Topics
627662
• Total Posts
2978506

• 9
• 10
• 12
• 22
• 13