从数据库中读取图像数据 [英] reading image data from database

查看:85
本文介绍了从数据库中读取图像数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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[^]


这篇关于从数据库中读取图像数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆