Re: binary data - Mailing list pgsql-jdbc

From Anders Hermansen
Subject Re: binary data
Date
Msg-id 20030302132100.GA18201@online.no
Whole thread Raw
In response to binary data  ("Uwe Kubosch" <donv@crusaders.no>)
Responses Re: binary data
List pgsql-jdbc
* 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

pgsql-jdbc by date:

Previous
From: "Uwe Kubosch"
Date:
Subject: binary data
Next
From: "Uwe Kubosch"
Date:
Subject: Re: binary data