Received: from cda.mrs.umn.edu (root@cda.mrs.umn.edu [146.57.3.11]) by hub.org (8.10.1/8.10.1) with ESMTP id e6I565022479 for ; Tue, 18 Jul 2000 01:06:05 -0400 (EDT) Received: from netasol.com (ctrts1-3.mrs.umn.edu [146.57.4.203]) by cda.mrs.umn.edu (8.10.0/8.10.0) with ESMTP id e6I560104890; Tue, 18 Jul 2000 00:06:00 -0500 (CDT) Message-ID: <3973E5C9.9FCDA902@netasol.com> Date: Tue, 18 Jul 2000 00:06:18 -0500 From: Matt Fair Organization: Netasol Networks, Inc. X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: Joachim Achtzehnter CC: pgsql-interfaces@postgresql.org Subject: Re: Clob or Blob in JDBC References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/115 Thank you for your help and quick response. Matt Fair Joachim Achtzehnter wrote: > On Mon, 17 Jul 2000, Matt Fair wrote: > > > > 1. How can I store a String into the database? (can be up to 4000 > > characters, so I do not want to use varchar) I have been told that if > > I were to take that string and convert it into a byte[] that I could > > store it like that. > > A BLOB can be stored using the setBytes() method of PreparedStatement, it > can be retrieved using the getBytes() method of ResultSet. > > > 2. Do I have to manually set the OID number? > > No, the setBytes() method will do this for you. > > Note, that BLOB operations must be done inside a transaction. Do NOT use > the autocommit setting when manipulating BLOBS. > > > 3. Is there a place on the internet where I can download the source for > > the most current jdbc? > > The most current would be in CVS. Released versions of Postgresql > including the JDBC driver are available as compressed tar files. See > http://www.postgresql.org (click on Software) for the links. > > Joachim