Skip site navigation (1) Skip section navigation (2)

JDBC and LOB

From: Gabriel López Millán <gabilm(at)dif(dot)um(dot)es>
To: postgres <pgsql-general(at)postgresql(dot)org>, postgres-ayuda <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: JDBC and LOB
Date: 2000-07-10 10:33:51
Message-ID: 3969A68F.C7DA777D@dif.um.es (view raw or flat)
Thread:
Lists: pgsql-es-ayudapgsql-general
    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.



pgsql-es-ayuda by date

Next:From: Miguel Angel López HernándezDate: 2000-07-10 15:13:09
Subject: Re: [pgsql-ayuda] [GENERAL] PostgreSQL vs. MySQL (fwd)
Previous:From: Gabriel López MillánDate: 2000-07-10 08:31:31
Subject: [pgsql-ayuda] datos binarios ..

pgsql-general by date

Next:From: Travis BauerDate: 2000-07-10 10:37:09
Subject: SQL question
Previous:From: Holger KlawitterDate: 2000-07-10 09:36:19
Subject: Re: Counting affected rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group