开发者

How do I save an embedded image in Microsoft Access to a file?

开发者 https://www.devze.com 2023-04-12 21:25 出处:网络
I have a lot of images embedded in an Access database.I need to save the images 开发者_如何学运维to a file.How do I do this in VBA?You need the GetChunk and AppendChunk functions.

I have a lot of images embedded in an Access database. I need to save the images 开发者_如何学运维to a file. How do I do this in VBA?


You need the GetChunk and AppendChunk functions.

Here are some MSDN pages about how to load and save images from Access databases:

  • How To Read and Write BLOBs Using GetChunk and AppendChunk
  • Reading, Storing, & Writing Binary Large Objects (BLOBs)

And here are two example databases for Access 97 and 2000.
(You want the module basBLOB from in there - the code is based on the second MSDN page)


OLE objects is bad way of storing images in MS Access. Use OLEToDisk (http://www.lebans.com/oletodisk.htm) to save your images as pic files.

After that reimport them in nice way. Check AccessImagine (http://access.bukrek.net) for working with images in Access - it does all the hard job.

0

精彩评论

暂无评论...
验证码 换一张
取 消