Oid Type

Oid Type

am 12.12.2004 18:56:51 von Luca

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