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

Re: InputStream as parameter not supported

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Steven Smith <steven(at)geometryit(dot)com>
Cc: PostgreSQL JDBC Mailing List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: InputStream as parameter not supported
Date: 2001-04-23 15:11:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Quoting Steven Smith <steven(at)geometryit(dot)com>:

> I am using PostgreSQL 7.0, with the jdbc7.0-1.2.jar file.
> I am trying to send a Large Object to the database but get an error
> saying
> 'InputStream as parameter not supported'
> The offending statement is
> 'stmt.setBinaryStream(1, geomStream, geomStream.available());'
> where geomStream is an instanceof ByteArrayInputStream and stmt is a
> PreparedStatement.
> The exact same code runs beautifully under Oracle, but throws this
> exeption
> under PostgreSQL.
> I have followed the documentation to the letter so I don't see why it
> throws
> the exception.
> The field in the table is of type 'oid', which the documentation uses.

These methods are implemented in 7.1. Prior to 7.1, you have to use the 
getBytes/getBytes methods or the large object api's.


Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver:
RetepPDF PDF library for Java:

In response to

pgsql-jdbc by date

Next:From: Peter T MountDate: 2001-04-23 15:14:03
Subject: Re: 7.1 RPM has old JDBC driver - SQL statement too long
Previous:From: B.N.V. RamanDate: 2001-04-23 10:17:55
Subject: RE: Another Problem Connecting to JDBC7.0

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