http://support.microsoft.com/default.aspx?scid=kb;EN-US;309158你看看吧,把 bmp 改成word 试试。。

解决方案 »

  1.   

    我也没试过,看这样行不行。用流方式取,设置上下文类型为word.
    还有方法是真接上传文件到指定目录,数据库存储路径。
      

  2.   

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;317016
      

  3.   

    搞定了
    谢谢
    下面是我的代码:
    string strconn="..."; //建立Command命令
     byte[] buffByte = null; SqlConnection conn=new SqlConnection(strconn);
    SqlCommand cmd=new SqlCommand();
    cmd.CommandText="wordtableselect";
    cmd.CommandType=CommandType.StoredProcedure;
    cmd.Connection=conn; //创建Parameter
    cmd.Parameters.Add("@id",System.Data.SqlDbType.Int);
    cmd.Parameters[0].Value = 1;

    try
    {
    conn.Open();
    SqlDataReader dr=cmd.ExecuteReader();
    while (dr.Read())
    {
    buffByte = ((byte[])dr[0]);
    }
    conn.Close();
    }
    catch(System.Exception ee)
    {
    MessageBox.Show(ee.Message );
    }
    System.IO.MemoryStream ms = new System.IO.MemoryStream(buffByte);
    // set the file name from the open file dialog
    string fileName = @"f:\ee.doc";
    System.IO.FileStream fs = 
    new System.IO.FileStream(fileName, System.IO.FileMode.Create, System.IO.FileAccess.Write); fs.Write(buffByte, 0, buffByte.Length); fs.Close();
      

  4.   

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;309158