Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 46418 invoked from network); 6 Mar 2009 07:48:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 07:48:50 -0000 Received: (qmail 35500 invoked by uid 500); 6 Mar 2009 07:48:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 35468 invoked by uid 500); 6 Mar 2009 07:48:49 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 35459 invoked by uid 99); 6 Mar 2009 07:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 23:48:48 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.24] (HELO gmp-eb-inf-2.sun.com) (192.18.6.24) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 07:48:40 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe2.eu.sun.com [192.18.6.11]) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n267mGwO022643 for ; Fri, 6 Mar 2009 07:48:18 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; format=flowed; charset=ISO-8859-1 Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008)) id <0KG200L00QTGNK00@fe-emea-09.sun.com> for derby-user@db.apache.org; Fri, 06 Mar 2009 07:48:16 +0000 (GMT) Received: from [129.159.139.223] ([unknown] [129.159.139.223]) by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008)) with ESMTPSA id <0KG200JZER07IWD0@fe-emea-09.sun.com> for derby-user@db.apache.org; Fri, 06 Mar 2009 07:48:08 +0000 (GMT) Date: Fri, 06 Mar 2009 08:47:27 +0100 From: Kristian Waagan Subject: Re: How to read blobs? In-reply-to: Sender: Kristian.Waagan@Sun.COM To: Derby Discussion Message-id: <49B0D50F.7060608@Sun.COM> References: <5627810d0903050937v1fb851doe4be24dcb16b75c7@mail.gmail.com> User-Agent: Thunderbird 2.0.0.18 (X11/20090203) X-Virus-Checked: Checked by ClamAV on apache.org epdv wrote: > > Thank You for the answer - but I've also got problems with > autocommit(false): Recordset not open. How can I get the InputStream > then, and can I access the opened InputStream independently from the > blob, i.e. can I read the stream still after freeing the blob? You can operate on the Blob until you commit or rollback if you turn off autocommit. As soon as you call Blob.free(), the Blob object, or any objects obtained from it (like an InputStream), cannot be used any more. This holds regardless of whether you have committed/aborted or not. The problem you see with the result set, must be something else. -- Kristian > > Kind regards > > Peter Nabbefeld > > > > Donald McLean schrieb: >> You cannot use blobs with autocommit(true). It just doesn't work. >> >> Donald >> >> On Thu, Mar 5, 2009 at 8:38 AM, epdv wrote: >>> Hello! >>> >>> I want to read blobs in a loop (more exact: the length of the blobs). >>> I'm >>> using a connection with autocommit(true) and a prepared statement >>> with sth. >>> like "select mydata, myblob where mykey=?". >> ------------------------------------------------------------- >> Family photographs are a critical legacy for >> ourselves and our descendants. Protect that >> legacy with a digital backup and recovery plan. >> > >