The Artima Developer Community
Sponsored Link

Java Answers Forum
Object and Image Classes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David de Lorenzo

Posts: 2
Nickname: delo
Registered: Mar, 2002

Object and Image Classes Posted: Mar 17, 2002 5:03 AM
Reply to this message Reply
Advertisement
I have a postgreSQL database. In one table, i store photos in a OID field type. When i extract it in a resultset from my Java program, how can i show it in a new ImageIcon??
I am trying something like this:
ResultSet oid=sentencia.executeQuery("SELECT photo FROM tablePhotos where id ='anyID';");
oid.next();

a=myStatement.executeQuery("SELECT lo_export('"+oid.getString(1)+"','/path/photo.gif');");

It works, but if i execute my program in another computer (not in the database server), i cannot use this because lo_import works locally in the server filesystem...

I need how to extract the photo from the OID directly, from my resultset to the ImageIcon...

Please, any ideas??? Thanks!

Topic: Help with an Array of strings Previous Topic   Next Topic Topic: How to clear this field

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use