aspose file tools*
The moose likes JDBC and the fly likes Image retreival from oracle and display in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Image retreival from oracle and display in java" Watch "Image retreival from oracle and display in java" New topic
Author

Image retreival from oracle and display in java

kumar lakkapragada
Greenhorn

Joined: Apr 27, 2001
Posts: 4
Hi,
Thanks in advance.
Kindly let me know how to store an image in Oracle database, retrieve from the database to display it in Java.
Regards,
Rama Kumar
Kathy Shkarlet
Ranch Hand

Joined: Dec 01, 2000
Posts: 43
Hi Kumar,
I assume you already have your image as a binary file.
You would need to store it in a BLOB (binary large object) column in the database - plain JDBC does it nicely.
Then just use a Swing component or awt Graphics object to show it.
Kathy

Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
check out the LOB example.
Jamie
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

LOB
I thought the BFILE was better... http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/BFILESample/README.txt

architect.gif - Image file which is stored as BFILE Column

just a thought!!!
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Madhav Lakkapragada:

LOB
I thought the BFILE was better... http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/BFILESample/README.txt
[b]
architect.gif - Image file which is stored as BFILE Column

just a thought!!!
- satya[/B]

can't say I'm a pro at working with images by any means, but Oracle's JDBC driver provides API to perform selects, updates, inserts and deletes to images from LOB columns. Maybe you could explain to me the differences/advantages of BFILEs over BLOBs as I'm unsure.(or a link would be good too!) If I find any, I'll post them.
Jamie
Jamie
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

found some information:
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83724/basic4.htm#1010491
but it still doesn't give differences??
Jamie
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Image retreival from oracle and display in java
 
Similar Threads
Book Giveaway
To retrieve an image from the database and display it in a JSP page
capture Image From Excel To Database
generating image with java
i m using flex and java and my db is mysql, i want to display image in flex from database