Re: Large objects with JDBC

Поиск
Список
Период
Сортировка
От Joachim Achtzehnter
Тема Re: Large objects with JDBC
Дата
Msg-id Pine.LNX.4.21.0008131253590.4724-100000@wizard.kraut.bc.ca
обсуждение исходный текст
Ответ на Large objects with JDBC  (Rob Judd <rjudd@mlug.missouri.edu>)
Список pgsql-interfaces
Yesterday, in a message to pgsql-interfaces, Rob Judd wrote:
>
> I would like to save Java objects in the database.  I tried a couple of
> different ways before finding one that worked, and I'd like to know if
> my first attempts failed because the functionality is missing in the
> java classes, or if I did something wrong.  
> 
> Serialize.create(conn, Vector.class) failed - looking in the sources it
> seemed to be missing the code to support arrays.
> 
> PreparedStatement.setBinaryStream(1, InputStream, length) failed with a
> not supported exception.

You can use PreparedStatement.setBytes() as an alternative.

> I did manage to get this working eventually using a different method
> (the large object API) but the other ways seemed much more straight
> forward.

Another disadvantage of the large object API is that it is specific to
Postgresql. This can become an issue if you ever need to port to another
database, e.g. Interbase.

Joachim

--
work:     joachima@realtimeint.com (http://www.realtimeint.com)
private:  joachim@kraut.bc.ca      (http://www.kraut.bc.ca)




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: george stewart
Дата:
Сообщение: Link for osage.sourceforge.net at pgsql interfaces
Следующее
От: Peter Mount
Дата:
Сообщение: RE: JDBC2 support