pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gabriel López Millán <gabilm@dif.um.es>
To: pgsql-interfaces@postgresql.org
Subject: JDBC Interfaces
Date: Mon, 10 Jul 2000 13:16:57 +0200
Message-ID: <3969B0A9.84CD6B2E@dif.um.es> (raw)

Hi, I try to run  this example:

     String query = "INSERT INTO requestTable VALUES (?,?);";
     int i = 1;

     PreparedStatement ps =
(PreparedStatement)connection.prepareStatement(query);
     ps.setInt(1,i);
     ByteArrayInputStream bis = new ByteArrayInputStream(b);
     ps.setBinaryStream(2,bis,bis.available());
     ps.executeUpdate();        // execute the insert statement
     System.out.println("ejecuta");
     ps.close();                // close the prepared statement
     bis.close();

     where de segundo parameter is a oid type.

    The response is:


    SQL Exception: InputStream as parameter not supported

    What tipes of InputStream are supported?
    Where can I find more information?

    Thanks, Gabi.



view thread (2+ messages)  latest in thread

Message-ID: <3969B0A9.84CD6B2E@dif.um.es>
Permalink:  ../3969B0A9.84CD6B2E@dif.um.es/
Also on:    postgresql.org/message-id/3969B0A9.84CD6B2E@dif.um.es

 · 

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: gabilm@dif.um.es
  Subject: Re: JDBC Interfaces
  In-Reply-To: <3969B0A9.84CD6B2E@dif.um.es>

* 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