Subject Re: InputStream Closed
Author Roman Rokytskyy
> Cool. I guess if that is the case, if I am careful to always close
> or commit transactions then there is no need for me to explicitly
> close the result set.

Hmmm... Not sure. Result set will not survive commit, but I do not
know if this will release server resources, it should. Anyway,
according to the JDBC spec result set is automatically closed when the
statement is closed. Since statement closing is quite good idea :),
result set will be usually closed earlier.

> >> What you can do, is to fetch the blob field (rs.getBlob), then close
> >> the result set (here the blob is closed, i.e. all open input streams
> >> are closed) and only then obtain input stream from the Blob. I
> haven't
> >> tried this, but it should work.
>
> This will reconnect to the database and reengage the blob data?

No, connection must be open and have an active transaction, result set
might be closed. In fact, result set contains only blob ID, all work
with blob is done via separate API. JayBird hides this difference on
JDBC level, but sometimes it might be useful to work with blob directly.

Roman