pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anders Hermansen <anders@yoyo.no>
To: pgsql-jdbc@postgresql.org
Subject: Re: binary data
Date: Sun, 2 Mar 2003 14:21:00 +0100
Message-ID: <20030302132100.GA18201@online.no> (raw)
In-Reply-To: <CHECLDNPGHELOIINBBLEKEEEEIAA.donv@crusaders.no>
References: <CHECLDNPGHELOIINBBLEKEEEEIAA.donv@crusaders.no>

* Uwe Kubosch (donv@crusaders.no) wrote:
> Hi all!

Hi

> I fetch the image back from the database with code similar to this:
> 
> String query;
> ResultSet resultSet;
> 
> query = "SELECT content FROM tfile WHERE id=4";
> resultSet = null;
> 
> try {
>   boolean more;
> 
>   resultSet = executeTheQuery(query);
>   more = resultSet.next();
> 
>   if (more) {
>     InputStream is;
> 
>     is = resultSet.getBinaryStream("content");
>     setContent(is);

Why don't you show us the setContent method?

>   }
> } catch (SQLException anSQLException) {
> }


Anders

--
Anders Hermansen
YoYo Mobile as



view thread (15+ messages)  latest in thread

Message-ID: <20030302132100.GA18201@online.no>
Permalink:  ../20030302132100.GA18201@online.no/
Also on:    postgresql.org/message-id/20030302132100.GA18201@online.no

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: anders@yoyo.no
  Subject: Re: binary data
  In-Reply-To: <20030302132100.GA18201@online.no>
  References: <CHECLDNPGHELOIINBBLEKEEEEIAA.donv@crusaders.no> <20030302132100.GA18201@online.no>

* 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