469,291 Members | 1,703 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,291 developers. It's quick & easy.

Binding an Image to a picturebox

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
Aug 11 '06 #1
2 2408
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

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:OF**************@TK2MSFTNGP06.phx.gbl...
>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

Aug 11 '06 #2
On Fri, 11 Aug 2006 09:43:21 -0500, "Ryan" <Ty****@newsgroups.nospamwrote:

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)
Aug 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jesse | last post: by
1 post views Thread by marco | last post: by
2 posts views Thread by marco | last post: by
6 posts views Thread by Patrick Dugan | last post: by
7 posts views Thread by lgbjr | last post: by
4 posts views Thread by John Swan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.