From derby-user-return-8892-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Mar 19 03:45:22 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 52326 invoked from network); 19 Mar 2008 03:45:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2008 03:45:22 -0000 Received: (qmail 33713 invoked by uid 500); 19 Mar 2008 03:45:20 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 33368 invoked by uid 500); 19 Mar 2008 03:45:19 -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 33357 invoked by uid 99); 19 Mar 2008 03:45:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 20:45:19 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.19.7] (HELO sineb-mail-2.sun.com) (192.18.19.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 03:44:27 +0000 Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged)) by sineb-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m2J3j7BF029199 for ; Wed, 19 Mar 2008 03:45:08 GMT Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JXY00B01KH3LF00@mail-apac.sun.com> (original mail from V.Narayanan@Sun.COM) for derby-user@db.apache.org; Wed, 19 Mar 2008 11:44:35 +0800 (SGT) Received: from [192.168.1.2] ([122.167.30.27]) by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JXY00BTSL1RMH63@mail-apac.sun.com> for derby-user@db.apache.org; Wed, 19 Mar 2008 11:44:22 +0800 (SGT) Date: Wed, 19 Mar 2008 09:14:24 +0530 From: Narayanan Subject: Re: Re-using an existing db and archiving data In-reply-to: Sender: V.Narayanan@Sun.COM To: Derby Discussion Message-id: <47E08C18.1090305@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT References: <47DED655.8090305@fastmail.fm> <47DEF5F3.9080501@sun.com> <16112414.post@talk.nabble.com> <47E04F29.7080800@sun.com> User-Agent: Thunderbird 2.0.0.6 (X11/20071022) X-Virus-Checked: Checked by ClamAV on apache.org Mark Hiles wrote: > How do I get a call stack? > > If using rs.last() is inefficient, is there a better way to determine how many > results my query has returned? > > Many Thanks.. > > I do the following try { } catch (Exception e) { e.printStackTrace(); } I guess to find the number of rows in a result set I would iterate through the result set or use a count(*) query. But then I googled for the phrase "number of rows in a result set" and found an interesting related discussion running here http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=3&t=008893 HTH, Narayanan