从数据库中读取图像数据
问题描述:
byte[] arrayImage = (Byte[])Convert.ChangeType(ds.Tables[0].Rows[tblnam.Position]["Person_ImageByte"], typeof(Byte[]));
MemoryStream ms1 = new MemoryStream(arrayImage);
pictureBox2.Image = Image.FromStream(ms1);
我已经使用此代码从数据库中获取图像数据了.但是当我获取该数据时,它给了我错误:
i have use this code to get image data from database.. but when i fetch that data its giving me error :
Parameter are not valid;
请解决这个问题,我被这个问题困扰了.
提前致谢
问候,
ashraf paracha
plz solve it i m stuck up with this problem.
thnks in advance
Regards,
ashraf paracha
答
也许这会有所帮助.它显示了向数据库 C#相册查看器 [
Maybe this will help. It shows reading and writing images to/from a database C# Photo Album Viewer[^]