First of all, the parm for
IO.File.ReadAllBytes
is a file path. If you are storing your image in bytes you don't need this.
Secondly,
IO.File.ReadAllBytes
Returns a Byte Array. Not a byte. That is why
CByte
doesn't work.
If you are having trouble understanding built in functions like that, try google or MSDN for help. For example, here is the documentation on
ReadAllBytes[
^].
Try declaring
vrPicFromDB
as a byte array and then just set it equal to
DsPic.tblPicTest.Item("Picture")
.