Writing binary - UPDATE

Поиск
Список
Период
Сортировка
Искать

Writing binary - UPDATE

От:
Andreas Bauer <buki@gmx.net>
Дата:
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

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post

Re: Writing binary - UPDATE

От:
Barry Lind <blind@xythos.com>
Дата:
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
> 



FAQ