G
Gary Shell
I have a column named "PictureImage" in a SQL database defined as
datatype=image. It has a Bitmap picture in it. (I verified the type by
creating an Access project and a looking at the data, which access reports
as "Bitmap Image".)
In my VB.NET app I use the following code:
Dim bytBLOBData() As Byte =
Me.datasetProduct.Tables("Product").Rows(0)("PictureImage")
Dim stmBLOBData As New MemoryStream(bytBLOBData)
Me.pictureProduct.Image = Image.FromStream(stmBLOBData)
The last line of code (image.fromstream) always produces an Invalid
Parameter error.
Does anyone have any working samples of similar code. I've done a Google
search and see that other folks have similar errors, but no solutions.
Gary
datatype=image. It has a Bitmap picture in it. (I verified the type by
creating an Access project and a looking at the data, which access reports
as "Bitmap Image".)
In my VB.NET app I use the following code:
Dim bytBLOBData() As Byte =
Me.datasetProduct.Tables("Product").Rows(0)("PictureImage")
Dim stmBLOBData As New MemoryStream(bytBLOBData)
Me.pictureProduct.Image = Image.FromStream(stmBLOBData)
The last line of code (image.fromstream) always produces an Invalid
Parameter error.
Does anyone have any working samples of similar code. I've done a Google
search and see that other folks have similar errors, but no solutions.
Gary