Re: updateBlob()-example?

From: Guido Fiala <guido(dot)fiala(at)dka-gmbh(dot)de>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: updateBlob()-example?
Date: 2004-02-12 09:37:08
Message-ID: 200402121037.08198.guido.fiala@dka-gmbh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Am Donnerstag, 12. Februar 2004 10:05 schrieb Kris Jurka:
> It is entirely unclear what your column's underlying data type is, for
> binary data it should be oid or bytea, but the only mention of datatype in
> your email is varchar. The Blob interface only works with the oid

That was failure number one ;-)

> datatype and large object method and even then support is poor. JDBC3 has
> added write support for blobs, but these have not been implemented in the
> pg JDBC driver. If you want to use large objects the easiest way is to

Ok, then i would use setBytes/getBytes anyway.

> pass compatible=7.1 as a URL parameter

How do i specify that paramter in the URL?

>and then use setBytes/getBytes.

> Could you be more clear on what you want to do and where it is failing?

I tried using rs.updateBytes() and using bytea datatype and writing seems to
work now.
But if the data are read back using getBytes() the RTF-Editorkit mourns about
"to many closed brackets", but that might not be a problem of JDBC, still
tracking it down.

Have not yet tried using setBytes() - would that make a difference other than
speed?

> The numerous one line snippets you have included aren't clear and actually
> seem contradictory to me.

Sorry - yes they were contradictory, i just pointed out all ways i tried
already.

Thanks,
Guido

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-02-12 09:52:12 Re: updateBlob()-example?
Previous Message Kris Jurka 2004-02-12 09:05:15 Re: updateBlob()-example?