Subject | Re: InputStream Closed |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-06-20T20:45:02Z |
Hi,
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. I will add more clean way to obtain
Blob that is not controlled by underlying result set (but this will be
JayBird specific).
BTW, current version of JayBird contains implementation for
Blob.length() and has FBBlob.FBBlobInputStream.seek(int).
Best regards,
Roman Rokytskyy
> What if I wanted to have a ResultSet open for the life of aThis is against specification.
> transaction?
> Will connection.commit() close any result sets opened in thatYes, this is Firebird's design.
> transaction?
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. I will add more clean way to obtain
Blob that is not controlled by underlying result set (but this will be
JayBird specific).
BTW, current version of JayBird contains implementation for
Blob.length() and has FBBlob.FBBlobInputStream.seek(int).
Best regards,
Roman Rokytskyy