tags:

views:

176

answers:

2

How can I add and retrieve images from Microsoft Access database and also retrieve them using C# WinForms?

A: 

Look at using the .net oledb data provider for saving and retrieving blob(binary large object) values in a database.

http://cs.pervasive.com/forums/t/717.aspx

Bruce Adams
A: 

Convert image into byte[] and insert into column of type image. While retrieve check is not null and then read from datareader and typecast into byte[].

 if (dr["Image"] != DBNull.Value && dr["Image"] != null)
                            {
                                Image = (byte[])dr["Image"];
                            } 

From byte[] you can convert into image

Image img;
Image.FromStream(new MemoryStream(m_Image));
Nakul Chaudhary