How to: Display Pictures from a Database in Windows Forms
In Windows applications, you can use theto bind images in a database to appear in a control.
Any other controls that are available to your project that support data binding and can display images can be used in place of the PictureBox.
Items in the Data Sources window that are stored as byte arrays (pictures in a database are typically stored as byte arrays) have their control type set to None by default. Because byte arrays can contain anything from a simple array of bytes to the executable file of a large application, you must set the control for displaying byte-array columns based on your actual data. For columns that contain pictures, set that column's drop type to PictureBox from that item's control list. For more information, see.
The following procedure assumes that the Data Sources window is already populated with an item that is bound to your image. For more information, see.
To bind pictures in a database to a PictureBox control
In the Data Sources window, expand the desired table or object type to display its columns or properties.
Select the column or property that contains your image data, and from its control list, choose PictureBox.
Your form must be opened in the designer for the control drop-down lists to appear in the Data Sources window.