Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Image retreival from oracle and display in java

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic