hemant
hemant

Reputation: 564

Retrieve image from msaccess database in java

I have Stores an Image in Ms access Database and datatype of column is OLE OBJECT. But i am Unable to retrieve the Image from database. Please help..

When i try to Open Image its show Error

Unknown File Format or file not found.

Upvotes: 0

Views: 1178

Answers (1)

Himanshu
Himanshu

Reputation: 32602

First thing we need to do is set the column type as OLE Object. While saving the data into the column of type OLE Object, save the data as byte array, while retrieving the image from the column read the value, put the value into byte array and then convert the byte array to image type and display the same. This is very simple.

Upvotes: 1

Related Questions