Re: Writing binary - UPDATE

From: Barry Lind <blind(at)xythos(dot)com>
To: Andreas Bauer <buki(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Writing binary - UPDATE
Date: 2003-09-03 15:38:15
Message-ID: 3F560AE7.2090203@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Andreas,

You need to follow the documentation for the version of the driver you
are using. From what you have included below, it looks like you are
using a 7.2 or higher version of the driver along with the
setBytes/getBytes methods. In these driver versions the
setBytes/getBytes methods opperate on the 'bytea' datatype, not oid.
This functionality is documented in the Binary Data section of the JDBC
driver chapter in the documentation.

thanks,
--Barry

Andreas Bauer wrote:
> Hi,
>
> know I've figured out that it had something to do with the
> driver version. But now I get the following message and it doesn't
> work either:
>
> INSERT INTO blob_test VALUES ('noname.bmp', 'BM\\302p\\000\\000\\000\\
> .......
> \\335\\316\\335\\316\\000\\000')
>
> The table looks like this:
> CREATE TABLE blobl_tbl (
> name varchar(35),
> bmp oid
> );
>
> Thanks in advance
>
> Andi
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nicolas Modrzyk 2003-09-03 17:08:13 Postgresql java and blobs
Previous Message Lufkin, Brad 2003-09-03 14:25:11 COUNT