在数据网格视图中显示来自sql的图像? [英] display image from sql in data grid view ?
本文介绍了在数据网格视图中显示来自sql的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了这段代码:
SqlConnection con = new SqlConnection( Data Source = .; Initial Catalog = AnbarDB; Integrated Security = True); SqlCommand com = new SqlCommand();
SqlDataReader oldr;
DataTable Table = new DataTable();
con.Open();
com.Connection = con;
com.CommandText = SELECT * FROM TKala;
oldr = com.ExecuteReader();
Table.Load(oldr);
dataGridView1.DataSource = Table;
解决方案
< blockquote>你能否分享你想在Gridview中显示图像的aspx或HTML代码。我会帮助你。
谢谢Anup
哦...
对不起! :(
此图片:
http://s4.picofile.com/file/8169500742/Untitlederrorpic.png [ ^ ]
i used this code :
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=AnbarDB;Integrated Security=True"); SqlCommand com = new SqlCommand();
SqlDataReader oldr;
DataTable Table = new DataTable();
con.Open();
com.Connection = con;
com.CommandText = "SELECT * FROM TKala";
oldr = com.ExecuteReader();
Table.Load(oldr);
dataGridView1.DataSource = Table;
解决方案
Can you please share the aspx or HTML code where you want to display the image in Gridview.I will help you .
Thanks Anup
oh ...
excuse me ! :(
this image :
http://s4.picofile.com/file/8169500742/Untitlederrorpic.png[^]
这篇关于在数据网格视图中显示来自sql的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文