Subject | RE: [Firebird-Java] Re: InputStream Closed |
---|---|
Author | Robert DiFalco |
Post date | 2003-06-20T21:10:55Z |
>> Since statement closing is quite good idea :),Yes, but sadly I cache my statements across transactions since I have a
>> result set will be usually closed earlier.
finite number of them and they are so much faster once prepared.
>> No, connection must be open and have an activeGreat. I'll play with this. As always Roman, thanks for all the help.
>> transaction, result set might be closed.
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Friday, June 20, 2003 2:01 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: InputStream Closed
> Cool. I guess if that is the case, if I am careful to always closeHmmm... Not sure. Result set will not survive commit, but I do not
> or commit transactions then there is no need for me to explicitly
> close the result set.
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), thenclose
> >> the result set (here the blob is closed, i.e. all open inputstreams
> >> are closed) and only then obtain input stream from the Blob. INo, connection must be open and have an active transaction, result set
> haven't
> >> tried this, but it should work.
>
> This will reconnect to the database and reengage the blob data?
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
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.