首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

image.fromstream()参数无效解决方法

2013-07-04 
image.fromstream()参数无效SqlConnection con new SqlConnection(server.databasexiaoluo1integra

image.fromstream()参数无效
SqlConnection con = new SqlConnection("server=.;database=xiaoluo1;integrated security=true");
            sqlDataAdapter da = new sqlDataAdapter("select * from photo", con);
            DataSet ds=new DataSet();
            da.Fill(ds);
            MemoryStream ms = new MemoryStream((byte[])ds.Tables[0].Rows[0]["照片"]);
            Image image = Image.FromStream(ms);
            pictureBox1.Image = image;
[解决办法]
Image image = Image.FromStream((stream)ms);这是今天刚学到的

热点排行