W
wandii
Hi,
I have a table which contains a BLOB field for image. I would like
to copy a picture from
database directly to a picture box control and I have tried the
following:
Dim c as Integer
c = sDataSet.Tables(0).Rows.Count
Dim bytBLOBData() As Byte =
sDataSet.Tables(0).Rows(c-1)("Image")
Dim stmBLOBData As New System.IO.MemoryStream(bytBLOBData)
I get the error "Invalid Parameter user" after the following line:
Me.PictureBox2.Image = Image.FromStream(stmBLOBData)
I also tried changing the following line - still "Invalid Parameter
user" error.
Dim bytBLOBData() As Byte =
CType(sDataSet.Tables(0).Rows(c-1)("Image"), Byte())
Can anyone give me an idea please, thanks in advance.
Regards.
I have a table which contains a BLOB field for image. I would like
to copy a picture from
database directly to a picture box control and I have tried the
following:
Dim c as Integer
c = sDataSet.Tables(0).Rows.Count
Dim bytBLOBData() As Byte =
sDataSet.Tables(0).Rows(c-1)("Image")
Dim stmBLOBData As New System.IO.MemoryStream(bytBLOBData)
I get the error "Invalid Parameter user" after the following line:
Me.PictureBox2.Image = Image.FromStream(stmBLOBData)
I also tried changing the following line - still "Invalid Parameter
user" error.
Dim bytBLOBData() As Byte =
CType(sDataSet.Tables(0).Rows(c-1)("Image"), Byte())
Can anyone give me an idea please, thanks in advance.
Regards.