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

Re: Clob or Blob in JDBC

From: Matt Fair <matt(at)netasol(dot)com>
To: Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Clob or Blob in JDBC
Date: 2000-07-18 05:06:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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
> (click on Software) for the links.
> Joachim

In response to

pgsql-interfaces by date

Next:From: Peter MountDate: 2000-07-18 06:45:28
Subject: RE: Clob or Blob in JDBC
Previous:From: Joachim AchtzehnterDate: 2000-07-18 00:16:09
Subject: Re: Clob or Blob in JDBC

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