• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image retreival from oracle and display in java

 
kumar lakkapragada
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
check out the LOB example.
Jamie
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic