如题.

解决方案 »

  1.   

    貌似去.net发这个帖会比较好!以前看过一点点!貌似是binary.write把图片写出来!
      

  2.   

    //存入
    SqlConnection conn=new SqlConnection(@"data source=chenyuming2004VSdotNET;uid=sa;pwd=cym;database=lhf");
    conn.Open();
    SqlCommand cmd=new SqlCommand("insert into fuser values ('1a','1b',@i)",conn);
    byte[] ib=new Byte[60000];
    FileStream fs=new FileStream(@"D:windows temp emp.jpg",FileMode.Open ,FileAccess.Read );
    fs.Read(ib,0,60000);
    cmd.Parameters.Add("@i",SqlDbType.Image,(int)fs.Length);
    cmd.Parameters["@i"].Value=ib;
    cmd.ExecuteNonQuery();
    conn.Close();
      

  3.   

    从数据库读图片到pictureboxSqlConnection conn=new SqlConnection(@"data source=chenyuming2004VSdotNET;uid=sa;pwd=cym;database=lhf");
    conn.Open();
    SqlCommand cmd=new SqlCommand("select 照片 from fuser where password='1b'",conn);
    SqlDataReader reader=cmd.ExecuteReader();
    reader.Read();
    MemoryStream buf=new MemoryStream((byte[])reader[0]);
    Image image=Image.FromStream(buf,true);
    pictureBox1.Image=image; 
      

  4.   

    http://hi.baidu.com/tanjian/blog/item/b644a8ecbde1362763d09fea.html
      

  5.   

    这里很详细http://dotnet.aspx.cc/article/2a5dd7c6-a45a-48ab-a2e8-342a29f17506/read.aspx
      

  6.   

    这是取出http://dotnet.aspx.cc/article/ecd9ae16-8ff0-4a1c-9b9f-5e8b641cb1b1/read.aspx
    http://dotnet.aspx.cc/ShowDetail.aspx?id=EY1XLDYV-PIDF-43LO-1WFL-FMY5ALE1F635