Binding an Image to a picturebox

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

I have a very basic form that has controls bound to a SQL 2005 database for
an Employee Directory. I'm using a PictureBox control to bind to the
"Photo" field which is of datatype image. However, it doesn't seem to work.
It does not display the image from the database (it's blank). Also, when I
use a function to upload a new image, it displays correctly but shows
regardless of which record I am on. It then does not save to the database
on the dataset update command.

Help!'
Thanks,
Ryan
 
Nevermind it was some problem with the data imported from another database.
I cleared the photo field for all records and it works fine now (uploading
and saving).

Sorry!
Ryan
 
¤ I have a very basic form that has controls bound to a SQL 2005 database for
¤ an Employee Directory. I'm using a PictureBox control to bind to the
¤ "Photo" field which is of datatype image. However, it doesn't seem to work.
¤ It does not display the image from the database (it's blank). Also, when I
¤ use a function to upload a new image, it displays correctly but shows
¤ regardless of which record I am on. It then does not save to the database
¤ on the dataset update command.

See the following:

HOW TO: Copy a Picture from a Database Directly to a PictureBox Control with Visual Basic .NET
http://support.microsoft.com/?kbid=317670


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top