pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt Fair <matt@netasol.com>
To: Joachim Achtzehnter <joachim@kraut.bc.ca>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Clob or Blob in JDBC
Date: Tue, 18 Jul 2000 00:06:18 -0500
Message-ID: <3973E5C9.9FCDA902@netasol.com> (raw)
References: <Pine.WNT.4.21.0007171708540.154-100000@van4>

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




view thread (4+ messages)  latest in thread

Message-ID: <3973E5C9.9FCDA902@netasol.com>
Permalink:  ../3973E5C9.9FCDA902@netasol.com/
Also on:    postgresql.org/message-id/3973E5C9.9FCDA902@netasol.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: matt@netasol.com, joachim@kraut.bc.ca
  Subject: Re: Clob or Blob in JDBC
  In-Reply-To: <3973E5C9.9FCDA902@netasol.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox