pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC Interfaces
2+ messages / 2 participants
[nested] [flat]

* JDBC Interfaces
@ 2000-07-10 11:16 Gabriel López Millán <gabilm@dif.um.es>
  0 siblings, 0 replies; 2+ messages in thread

From: Gabriel López Millán @ 2000-07-10 11:16 UTC (permalink / raw)
  To: pgsql-interfaces

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: JDBC Interfaces
@ 2000-07-10 13:56 Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Mount @ 2000-07-10 13:56 UTC (permalink / raw)
  To: 'Gabriel López Millán' <gabilm@dif.um.es>; pgsql-interfaces

Hmmm, its not clear what you are trying to do. I presume you are writing to
a blob?

If so, then yes Streams are not yet supported. However, if it's a normal
column (ie: text, varchar, etc), then yes Streams are supported and it
should work.

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council


-----Original Message-----
From: Gabriel López Millán [mailto:gabilm@dif.um.es]
Sent: Monday, July 10, 2000 12:17 PM
To: pgsql-interfaces@postgresql.org
Subject: [INTERFACES] JDBC Interfaces


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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-07-10 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-10 11:16 JDBC Interfaces Gabriel López Millán <gabilm@dif.um.es>
2000-07-10 13:56 RE: JDBC Interfaces Peter Mount <petermount@it.maidstone.gov.uk>

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