Read a picture from Access DB into PictureBox

前端 未结 5 1856
情深已故
情深已故 2021-01-20 17:33

I have been trying to read a picture saved in Access DB as a OLE object in a PictureBox in a C# windows Application.

The code that does this is presented below:

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-20 18:18

    You can't read OLE objects so easily. In fact, it is bad practice to keep pictures as OLE objects in database.

    It is preferred to have em as BLOB objects or path and filename at some storage. AccessImagine can handle both scenarios for MS Access and C#. You can download it here - http://access.bukrek.net

提交回复
热议问题