wrong documentation and others .....

Поиск
Список
Период
Сортировка
От Gabriel Lopez
Тема wrong documentation and others .....
Дата
Msg-id 39DC5F29.E9F4023@dif.um.es
обсуждение исходный текст
Ответы Re: wrong documentation and others .....
Список pgsql-interfaces
  <p>    Hi all. <p>    I have several days working with LargeObject and postgres 7.0.2 and I have found many
problems.In the first time the postgresql doc is wrong, in chapter 58 of PosgreSQL tutorial (JDBC Interfaces) it repot
whoto work with Large Object and give code that is wrong: <p>        File file = new File("myimage.gif"); <br />       
FileInputStreamfis = new FileInputStream(file); <br />        PreparedStatement ps = conn.prepareStatement("insert into
imagesvalues (?,?)"); <br />        ps.setString(1,file.getName()); <br />       
ps.setBinaryStream(2,fis,file.length());<br />        ps.executeUpdate(); <br />        ps.close(); <br />       
fis.close();<p>        PreparedStatement ps = con.prepareStatement("select oid from images where name=?"); <br
/>       ps.setString(1,"myimage.gif"); <br />        ResultSet rs = ps.executeQuery(); <br />        if(rs!=null) {
<br/>            while(rs.next()) { <br />                InputStream is = rs.getBinaryInputStream(1); <br
/>               // use the stream in some way here <br />                is.close(); <br />                } <br
/>           rs.close(); <br />        } <br />        ps.close(); <br />  <p>        InputStream ARE NOT SUPPORTED in
JDBCimplementation ¡¿?¡ and "getBinaryInputStream()" really is "getBinaryStream()".  I think that it is very serious.
Theother method (that I know) is using LargeObjectAPI, but this fail every 9 times of PreparedStatement of setObject()
sentence¡¡¡ and when use LargeObjectManager as in source examples. (I send other messages to list) <br />  <p>       
HasPostgreSQL any way to work WELL with LargeObject.? <p>    Please reply me. <p>    Cheers, Gabi. <br />  <pre>-- 
 
Gabriel López Millán    
Facultad de Informática -Universidad de Murcia
30001 Murcia - España (Spain)
Telf: +34-968-364644 E-mail: gabilm@dif.um.es</pre>  

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

Предыдущее
От: "Billy G. Allie"
Дата:
Сообщение: Announcing PgSQL - a Python DB-API 2.0 compliant interface to PostgreSQL
Следующее
От: tjm2@mail.ikasths.dk (Troels Jegbjaerg Moerch)
Дата:
Сообщение: Re: wrong documentation and others .....