如何使用C#.net检索数据集中的图像 [英] How to retrieve a image in dataset using C#.net
本文介绍了如何使用C#.net检索数据集中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我的任务是显示数据集中的图像.
图像及其文本名称存储在数据库中.
我需要显示文本名称和图像名称.
例如:-
数据集:-
关注自然宝贝//图片文字名称
flow.jpg Na.jpg Baby.jpg//图像.
谁能给我发送示例代码.
在此先感谢
Hi All,
My task is to dispaly the images in dataset.
Images and their text name are stored in database.
i need to dispaly the textname and image names.
Ex:-
Dataset:-
Folwer Nature Baby //Image Text Name
flow.jpg Na.jpg Baby.jpg //Images.
Can any one send me the sample code for this.
Thanks in Advance
推荐答案
亲爱的朋友,
存储在数据库中的图片无法保留或插入到数据集列中,因为图像是一个流对象,只有在连接打开并且数据集处于断开连接模式时才能读取.
您必须使用sql datareader对象才能从数据库中读取图像:-),因为它与db保持连接,直到未从数据库中读取全部内容为止.
希望对您有所帮助.
谢谢
Dear Friend,
A picture stored in database can''t be kept or inserted into a dataset column as the image is a stream object which can be only read if the connection is open and dataset works into a disconnected mode.
You have to use sql datareader object in order to read image from the database :-) as it maintains a connection with the db till the time whole content is not read from the database.
I hope this will help you out.
Thanks
通过该链接可能会对您有所帮助
http://www.dotnettutorials.com/tutorials/database/save-retrieve-image-cs.aspx
go through this link it may help you
http://www.dotnettutorials.com/tutorials/database/save-retrieve-image-cs.aspx
此使用C#.NET DataSet和DataReader读取/写入BLOB [
This Read / Write BLOBs using C# .NET DataSet and DataReader[^] link might help you.
这篇关于如何使用C#.net检索数据集中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文