问题
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