Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Oid Type

Question posted by: Luca (Guest) on November 23rd, 2005 02:03 AM
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
 
Not the answer you were looking for? Post your question . . .
189,815 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors