winform 從Access中讀取圖片顯示到picturebox中

解决方案 »

  1.   

    byte[] byteImage = (byte[])ds.Tables[0].Rows[0][图片列名称];

    byte[] byteImage = (byte[])ds.Tables[0].Rows[0][图片列名称];
    Image img = (Image)ConvertFrom( byteImage );
      
      

  2.   

    Sample code as follows:
    byte[] byteImage = (byte[])ds.Tables[0].Rows[0][图片列名称];
    MemoryStream ms = new MemoryStream( byteImage, true );
    ms.Read( byteImage, 0, byteImage.Length );
    ms.Position = 0;
    yourPictureBox.Image = new Bitmap( ms );
      

  3.   

    byte[] byteImage = (byte[])ds.Tables[0].Rows[0]這句老是有問題,說是沒有資料列