怎么样在数据库里面存取图片?
能否给点具体的代码让小第瞧瞧?

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=EY1XLDYV-PIDF-43LO-1WFL-FMY5ALE1F635
      

  2.   

    http://blog.csdn.net/gaofeng2000/archive/2004/08/27/86264.aspx
      

  3.   

    RE:
    ====>楼上的你碰到服务商死都不给写权限的吗
    加点钱你看他给不给
      

  4.   

    Sql Server 中:http://support.microsoft.com/default.aspx?scid=kb;EN-US;309158Oracle 中:http://www.chinamacro.com/blog/visit_detail.aspx?blogID=53
      

  5.   

    string strImageID = Request.QueryString["id"];
    SqlConnection myConnection = new SqlConnection("Server=at;uid=test;pwd=;database=picTest");
    SqlCommand myCommand = new SqlCommand("Select * from picture Where id>1374531", myConnection);
    // System.Data.SqlClient.SqlDataReader myDataReader;

    myConnection.Open();
    SqlDataReader myDataReader;
    myDataReader= myCommand.ExecuteReader(CommandBehavior.CloseConnection);
    int i=0;
    while (myDataReader.Read())
    {
    Response.Clear();
    i++; // Response.ContentType = myDataReader["JPEG"].ToString();
    //time, news week, USA today, national geographi, digist reader 
    System.Web.UI.WebControls.Image imgtemp;
    imgtemp=(System.Web.UI.WebControls.Image)this.FindControl("Image"+i);
    byte[] MyData= new byte[0];
    MyData =  (byte[])myDataReader["Picture"];
    int ArraySize = new int();
    ArraySize = MyData.GetUpperBound(0); FileStream fs = new FileStream(@"C:\winnt\Gone Fishing2.jpg", FileMode.Create , FileAccess.Write);
    fs.Write(MyData, 0,ArraySize);
    fs.Close();
    imgtemp.ImageUrl =@"C:\winnt\Gone Fishing2.jpg"; }
      

  6.   

    http://www.yesky.com/20030113/1648152_1.shtml