很急啊,谢谢。。

解决方案 »

  1.   


    应该用文件流的方法存入和读取,我是用ASP.NET+SQL Server实现的,估计在oracle中也差不多这个样子,可以到我的blog里看一下
    http://dev.csdn.net/develop/article/52/52958.shtm
      

  2.   

    我已经存进去了,有什么方法能直接调用word把它打开呢
      

  3.   

    首先需要把文件内容从数据库读出来存放到DataReader中,然后进行下面的操作!
    Response.Clear();
    Response.ContentType=type; //文件类型,此类型应该事先获取
    Response.AddHeader("Content-Disposition","inline:filename="+reader["Title"].ToString()); //title为文件标题
    Response.BinaryWrite((Byte[])reader["Attentment"]);
     //attentment为附件内容,也就是image字段的内容
      

  4.   

    private void OpenDocument(string strFileName,Byte[] bContent,string strFileExt)
    {
    HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename="+strFileName+"."+strFileExt);
    HttpContext.Current.Response.Charset="GB2312";    
    HttpContext.Current.Response.ContentEncoding=System.Text.Encoding.Default;
    HttpContext.Current.Response.BinaryWrite(bContent);
    HttpContext.Current.Response.End();
    }
      

  5.   

    我读不出来啊现在
    this.reader.Read();
    this.Response.ContentType = this.reader["r_type"].ToString();
    Response.BinaryWrite((Byte[])reader["r_text"]);
    Response.End();
    reader.Close();是这样读吗
      

  6.   

    You can modify this source code.
    //显示照片
    byte[] MyPicData=new byte[0];
    DataTable dTable = this.dsSource1.Tables["MyTable"];
    DataRow myRow = dTable.Rows[myPosition];
    if(myRow["Photo"] != System.DBNull.Value)
    {
    MyPicData =  (byte[])myRow["Photo"];
    int ArraySize = new int();
    ArraySize = MyPicData.GetUpperBound(0)+1; 
    System.IO.MemoryStream ms = new System.IO.MemoryStream(MyPicData);
    //通过流对象建立Bitmap
    System.Drawing.Bitmap bmp = new Bitmap(ms);
    this.picEmp.Image = bmp;
    }