I'm facing the "invalid parameter" error while attempt to retrieve the photo from db and assign it to a memory stream and finally put into the picturebox. But, i found that an error of "invalid parameter" return while a couples attempt to assign the memorystream to the picturebox. As once I change or modify the variable, it will be alrights.
I googled most of web sites but fail to look for a proper solution as many people also faced the same problem as mine. Anybody have any idea of solving this problem and who has experienced or bump in this problem, how u all solve this problem. I have worked on this a fews day but no solution found.
As the code below is which I bump in this error:
ArrayImg = CType(rst4.Fields("nvcEmpPhoto").Value, Byte())
Dim ts As New System.IO.MemoryStream(ArrayImg)
Me.EmpPhotoHolder.Image = Image.FromStream(ts)
ts.close()
The bolded statement is where the error return to me.
Thanks in advanced if any solution or opinion been shared out.
I googled most of web sites but fail to look for a proper solution as many people also faced the same problem as mine. Anybody have any idea of solving this problem and who has experienced or bump in this problem, how u all solve this problem. I have worked on this a fews day but no solution found.
As the code below is which I bump in this error:
ArrayImg = CType(rst4.Fields("nvcEmpPhoto").Value, Byte())
Dim ts As New System.IO.MemoryStream(ArrayImg)
Me.EmpPhotoHolder.Image = Image.FromStream(ts)
ts.close()
The bolded statement is where the error return to me.
Thanks in advanced if any solution or opinion been shared out.