Binding an Image to a picturebox

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
 
R

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
 
P

Paul Clement

¤ 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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top