473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2540
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jesse | last post by:
Hi All, I've been working on a form that has several bound controls that all link to one table in a dataset. In the table, there is a column for the filename of jpeg images related to each...
1
by: marco | last post by:
I'm a newbie and i'm doing a little application that open image. I don't understand what i've to do to have a zoom of an image...i don't know where's the error. If anyone know a simple code tell me...
2
by: marco | last post by:
I'm a newbie and i'm doing a little application in C# for a Pocket PC that open image. I don't understand what i've to do to have a zoom of an image...i don't know where's the error. If anyone...
1
by: Cade Carvell | last post by:
Hello, I have a class that I have a public property on it for an Image. In my class I change the image, different image etc. Anyway, Everythign works fine for the first image. I an bind the...
6
by: Patrick Dugan | last post by:
Hello, I'm trying to load different images (icons) into a PictureBox1.Image. The first image loads just fine, but the second image always returns the error "Invalid property used." It doesn't...
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
4
by: John Swan | last post by:
Hello. I'm trying to create a simple program that amongst other things creates a thumbnail of an image (Bitmap) to a set size determined by the user in pixels? The problem is: All of the...
1
by: Joe Spears | last post by:
Hi Is there a simple way to bind a PictureBox image to a datatable?? I've tried pictureBox.DataBindings.Add("BackgroundImage", dt1, "Picture"); But it doesn't seem to work. Do I have to go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.