From: | Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il> |
---|---|
To: | Steffen Zimmert <szimmert(at)crcg(dot)edu>, pgsql-interfaces(at)postgreSQL(dot)org |
Subject: | Re: JDBC:Using Large Objects |
Date: | 1999-06-22 16:03:42 |
Message-ID: | l03130307b39562624224@[147.233.159.109] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-interfaces |
At 21:38 +0300 on 22/06/1999, Steffen Zimmert wrote:
> I created the associated database table with the following statement:
> create table images (imgname name, imgoid oid);
>
...
> // Create PreparedStatement
> PreparedStatement ps = db.prepareStatement("Insert into database values
> (?,?)");
> ps.setString(1,"TEST");
> ps.setBytes(2,objBytes);
> ps.executeUpdate();
> ps.close();
Well, if it's defined as an oid, and you pass an array of bytes to it, it
certainly won't work. An oid is a four-byte integer, not a byte array.
Please look in the Postgres programmer documentation, in the JDBC part,
under "Postgres Extensions to the JDBC API".
There is a separate mechanism to access PostgreSQL's large object
interface, as well as the geometric types etc.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Mount | 1999-06-22 16:27:54 | RE: [INTERFACES] JDBC:Using Large Objects |
Previous Message | Matt Magoffin (Borders Online) | 1999-06-22 15:40:46 | pg_dump: "error in finding the template1 database" |
From | Date | Subject | |
---|---|---|---|
Next Message | selkovjr | 1999-06-22 16:08:09 | Re: [INTERFACES] esql\c documentation |
Previous Message | Peter Mount | 1999-06-22 15:55:43 | RE: [INTERFACES] JDBC and character sets |