General discussion


how to save image using java?

By getcommon ·

i am using access as backend and java as frontend.

i want one field in access which should save image file. how to do this using jdbc-odbc
bridge ?

can it be done using access field as OLE object ... , using java I/O streams ... ,or some other method?

taking image object & using streams
how to save image in backend? in which form?
as an object or as a stream i.e. binary form?

which is an possible & easy way of doing this? or its not possible at all?

i don't want to keep image as a file on server side but as a data field in MS-access

i want the code for this.

any help is appreciated!
thank u.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

how to save image using java?

by amanabala In reply to how to save image using j ...


The only way you can store images directly in Access is through OLE objects and you need to specify the BMP file name at the time of setting the object.
I am really not sure if you can actually store an OLE object programmatically from Java into Access.
Another way of doing this is to create a field of type Hyperlink or even a text field to store the file name including path, such as "/images/ravi.jpg." From your java program, upload the file to that path and save the value in the db. While retrieving, you would lookup the full name and then load the image using regular java procedure. If this were to be a web applcation, then you could just create a Image link with this url.

Hope this helps.



Related Discussions

Related Forums