dbTalk Databases Forums  

Oid Type

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Oid Type in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Luca
 
Posts: n/a

Default Oid Type - 12-12-2004 , 12:02 PM






Hi,
i'm trying to save images on a postgres db.
I created a table like this:
CREATE TABLE image(name text, image oid);
and I inserted in it a file this way:
INSERT INTO image VALUES
('myimage',lo_import('/home/myhome/images/leaf.jpg'));

First of all: am I doing it right?

Now, when I write my query and I get my ResultSet what dataType I have
to use? For example:
ResultSet rs;
rs = rs = statement.executeQuery(query); //the query is a select *


Now I should get my "Oid" image and save it into a variable to use it.
How do I do it?

Thank you
Luca

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.