How to save the images in an MS Access database?

点点圈 提交于 2019-12-25 02:16:07

问题


I am using MS Access as the database in my project.

Can anyone help me to give idea that how can i save and retrieve images from this database?


回答1:


it is generally NOT a good idea to save image in database, instead, people usually save the image on disk, and store its path in database.

If you really want to do this, write the images' bytes into a Blob column.




回答2:


You need to capture the Image from your front-end, Java Application. After this make connection with the Access Database and store that ByteArray Data ( Photo ) in to Access Data whose data type should be Object.




回答3:


Create the table in the access database, give the name to field and select it's type as -'OLE' (Object Linking and Embedding, the type for storing obects like image, sound, etc.) And then try this code.



来源:https://stackoverflow.com/questions/8046606/how-to-save-the-images-in-an-ms-access-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!