Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 56329 invoked from network); 16 Mar 2007 13:35:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Mar 2007 13:35:47 -0000 Received: (qmail 10884 invoked by uid 500); 16 Mar 2007 13:35:55 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 10864 invoked by uid 500); 16 Mar 2007 13:35:54 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 10853 invoked by uid 99); 16 Mar 2007 13:35:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2007 06:35:53 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of greg.monroe@dukece.com designates 152.3.166.24 as permitted sender) Received: from [152.3.166.24] (HELO dukece.com) (152.3.166.24) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2007 06:35:43 -0700 Received: from ([10.123.20.205]) by smtpgw1.dukece.com with ESMTP id 4440076.109791; Fri, 16 Mar 2007 09:33:15 -0400 Received: from dukece-mail3.dukece.com ([10.123.20.204]) by mail.dukece.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 16 Mar 2007 08:36:05 -0500 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C767CF.EAAA005C" Subject: RE: Finding position of previous selected record in new ordering Date: Fri, 16 Mar 2007 09:35:08 -0400 Message-ID: <8F5843B903F59D4C8C6806BB49A3911902BB2726@dukece-mail3.dukece.com> In-Reply-To: <0765101BA5724F4DAC1607B4CF4BC1714C2561@scuderia09.vps.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Finding position of previous selected record in new ordering Thread-Index: AcdnprPACMyjEK23SoueWpTCqU1WBQAJ1l5w References: <0765101BA5724F4DAC1607B4CF4BC1714C2561@scuderia09.vps.local> From: "Greg Monroe" To: "Apache Torque Developers List" X-OriginalArrivalTime: 16 Mar 2007 13:36:05.0296 (UTC) FILETIME=[0BD8BB00:01C767D0] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C767CF.EAAA005C Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable You can use Criteria.setOffset to define the start point and Criteria.setLimit to define the number of records to return. This gets translated into the=20 appropriate DB server specific select. But test and verify that it work with your specific DB since there were issues with various DB prior to 3.3 (but I think they have been worked out now). =20 Also, you might look at the LargeSelect utility class. This does the=20 same thing but also has some performance/ease of use enhancements=20 like caching serveral pages, being able to select by page, supplying=20 page counts and the like. ________________________________ From: Tobias Hilka [mailto:thilka@vps.de]=20 Sent: Friday, March 16, 2007 4:40 AM To: Apache Torque Developers List Subject: Finding position of previous selected record in new ordering =09 =09 Hello everyone, =20 we are facing the following problem: =20 We have a grid with many entries (up to several 100 000 entries). For performance reasons we only select the window which is visible for the user (about 50 entries). The rest of the grid is initialized with null-Items. So far so good. =20 But now our problem: If we do order the grid by firstname ascending and select the fith entry, then we order the by the same column descending, we want the selection to persist and therefore we want the selection window to contain the selected entry in its new environment (e.g. position 99 950 to 100 000 and select record number 99 996). =20 Is there any possibility to express this in torque? We know about some special features of some databases which can handle this. And I think there are features in SQL 2003 for this. =20 =20 Thank you for your help. =20 =20 Tobias Duke CE Privacy Statement Please be advised that this e-mail and any files transmitted with it are = confidential communication or may otherwise be privileged or = confidential and are intended solely for the individual or entity to = whom they are addressed. If you are not the intended recipient you may = not rely on the contents of this email or any attachments, and we ask = that you please not read, copy or retransmit this communication, but = reply to the sender and destroy the email, its contents, and all copies = thereof immediately. Any unauthorized dissemination, distribution or = copying of this communication is strictly prohibited. ------_=_NextPart_001_01C767CF.EAAA005C--