Received: from pirania.dif.um.es (IDENT:root@pirania.dif.um.es [155.54.210.33]) by hub.org (8.10.1/8.10.1) with ESMTP id e96CYeJ88694 for ; Fri, 6 Oct 2000 08:34:40 -0400 (EDT) Received: from dif.um.es (IDENT:gabilm@pirania.dif.um.es [127.0.0.1]) by pirania.dif.um.es (8.9.3/8.9.3) with ESMTP id NAA01952 for ; Fri, 6 Oct 2000 13:51:27 +0200 Message-ID: <39DDBCBE.BF5F9748@dif.um.es> Date: Fri, 06 Oct 2000 13:51:26 +0200 From: Gabriel Lopez X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: psql Subject: Re: wrong documentation and others ..... References: <39DC5F29.E9F4023@dif.um.es> <004f01c02ebd$8f30a380$97bfedd4@pc4151> <39DC67BF.A28489A2@dif.um.es> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200010/17 Has anybody try this? I don't know why this error appear. Please, reply me. Thanks, Gabi. Gabriel Lopez escribió: > Troels Jegbjaerg Moerch escribió: > > > Hi try this: File file = new File("myimage.gif"); > > FileInputStream fis = new FileInputStream(file); > > byte[] theByteArray = new byte[fis.available()]; > > fis.read(theByteArray); > > > > PreparedStatement ps = con.prepareStatement("insert insert into > > images values (?,?)"); ps.setString(1,file.getName()); > > ps.setBytes(2, theByteArray); > > ps.execute(); > > con.commit(); > > ps.close(); > > fis.close(); > > TJM > > Yes, it work fine, but each 9 times it fail: > > FATAL 1: my bits moved right off the end of the world! > Recreate index pg_attribute_relid_attnam_index. > > Anybody known why? > > Thanks > > -- > 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 -- 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