loading picture from database to a pictureBox

fscsantos

Member
Joined
Aug 2, 2005
Messages
15
Programming Experience
Beginner
Database images

Hi.
I've a problem.
I need to convert images, from the databases (oledb objects) to disk.
I need code will load images from database, save them in hard disk (.jpg or other format)
If Anybody can help me I very gratefull
 
Error: loading picture from database to a pictureBox

Hi,
I have a problem when load a picture from database to a pictureBox, it gives the following error:
"Invalide parameter used"

Code:
Dim arrayImage() As Byte= _
CType(Me.DataSet11.Tables(0).Rows(Me.ListBox1.SelectedIndex) _
("Picture"), Byte())
Dim ms As New MemoryStream(arrayImage)
With Me.PictureBox1
.Image = Image.FromStream(ms)
.SizeMode = PictureBoxSizeMode.CenterImage
End With

"Picture" is a database field type Image

It will be that somebody will be able to help me? :eek: :eek:
 
Back
Top