Reading a picture from an "Ole Object" field in an access database

  • Thread starter Thread starter Marco Castro
  • Start date Start date
M

Marco Castro

I have a picture stored in an ole field in one of my access databases. Im
trying to put that picture into a picture box in one of my vb.net programs.
Unfortunately I keep on getting a type cast error whenever I try to copy it
there (through code) If I set a variable to variant and then read the value
into there, it wont error out on me and it's no longer set as nothing so
something was read into it but I still can't type cast the variable as an
image and copy it to the picture box. Can someone help me with this please.
 
Marco Castro said:
I have a picture stored in an ole field in one of my access databases. Im
trying to put that picture into a picture box in one of my vb.net programs.
Unfortunately I keep on getting a type cast error whenever I try to copy it
there (through code) If I set a variable to variant and then read the value
into there, it wont error out on me and it's no longer set as nothing so
something was read into it but I still can't type cast the variable as an
image and copy it to the picture box. Can someone help me with this
please.

Are you using VB 6, or VB.NET?
 
Back
Top