pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Didier Boudigue <didier.boudigue@nextenso.com>
To: pgsql-interfaces@postgresql.org
To: pgsql-interfaces@hub.org
Subject: JDBC and BLOB in Postgres
Date: Fri, 06 Oct 2000 14:27:39 +0200
Message-ID: <39DDC53B.DC22F0BE@nextenso.com> (raw)

Hi,

I'm trying  Blob with JDBC Driver jdbc7.0-1.2  on postgresql 7.0.2
(Mandrake 7.1) follwing the example given in paragraph "Using Large
Objects" Chapter 58. JDBC Interface.

the getBinaryStream seems ok provided the blob is in the database, 
while the setBinaryStream method call returns : 

	Error : InputStream as parameter not supported

Did I miss something ?

Thanks in advance.

The Code I'm using: 

File file = new File("Blob.class");
FileInputStream fis = new FileInputStream(file);			
cx.setAutoCommit(false);
ps = cx.prepareStatement("insert into mytable (myid, myblob) values (1,
?)");
ps.setBinaryStream(1, fis, (int) file.length());
ps.executeUpdate();
ps.close();
fis.close();
cx.commit();







view thread (2+ messages)  latest in thread

Message-ID: <39DDC53B.DC22F0BE@nextenso.com>
Permalink:  ../39DDC53B.DC22F0BE@nextenso.com/
Also on:    postgresql.org/message-id/39DDC53B.DC22F0BE@nextenso.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: didier.boudigue@nextenso.com, pgsql-interfaces@hub.org
  Subject: Re: JDBC and BLOB in Postgres
  In-Reply-To: <39DDC53B.DC22F0BE@nextenso.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox