Problem using PreparedStatement.get/setBinaryStream() - Mailing list pgsql-jdbc

From Ho, Khanh
Subject Problem using PreparedStatement.get/setBinaryStream()
Date
Msg-id 73388857A695D31197EF00508B08F29804F4D0D5@ntmsg0131.corpmail.telstra.com.au
Whole thread Raw
List pgsql-jdbc
Hi,

I have Postgresql 7.1 installed on a Red Hat Linux 6.2 system.
I have been trying to use PreparedStatement.get/setBinaryStream()
to read and write (binary) large objects to the database.

With my latest compiled JDBC driver (jdbc7.1beta5 I presume), the
large object seems to save correctly to the database, but is not read
back properly (the retrieved object is smaller than it should be, ie. lost
data). However, there are no exceptions thrown.

Interestingly, when I try to use an older JDBC driver (jdbc7.1beta4), it
manages to correctly read back the object stored by the jdbc7.1beta5 driver.
However, the jdbc7.1beta4 driver itself can't write the large object to the
database. It throws an exception with the message:
    InputStream as parameter not supported

Any suggestions?

Thanks,
Khanh.



pgsql-jdbc by date:

Previous
From: "Mihai Gheorghiu"
Date:
Subject: Driver
Next
From: Hannu Krosing
Date:
Subject: Re: Re: [HACKERS] Outstanding patches