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.
Bruce Adams
2010-03-03 11:18:46
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
2010-03-03 11:47:17