上篇读取过会,显示时代码如下:
SqlConnection conn = new SqlConnection("Server=.;DataBase=student;Integrated Security=true;");
SqlCommand comm = new SqlCommand("select * from [Name]", conn);
SqlDataAdapter da = new SqlDataAdapter(comm);
DataSet ds = new DataSet();
da.Fill(ds, "Name");
MemoryStream ms = new MemoryStream((byte[])ds.Tables[0].Rows[4][2]);
pictureBox2.SizeMode = PictureBoxSizeMode.Zoom;
pictureBox2.Image = Image.FromStream(ms);