Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 84410 invoked from network); 16 Jul 2009 06:52:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jul 2009 06:52:19 -0000 Received: (qmail 38073 invoked by uid 500); 16 Jul 2009 06:53:24 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 38018 invoked by uid 500); 16 Jul 2009 06:53:24 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 38007 invoked by uid 99); 16 Jul 2009 06:53:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 06:53:24 +0000 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 (athena.apache.org: local policy) Received: from [212.127.254.144] (HELO vmx15.multikabel.net) (212.127.254.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 06:53:12 +0000 Received: from vmx130.multikabel.net ([212.127.254.155]) by vmx15.multikabel.net with esmtp (Exim 4.44) id 1MRKpa-0001eD-7i for user-java@ibatis.apache.org; Thu, 16 Jul 2009 08:52:38 +0200 Received: from [192.168.0.13] (82-217-226-124.cable.quicknet.nl [82.217.226.124]) by vmx130.multikabel.net (8.13.8/8.13.3) with ESMTP id n6G6qVWV028427 for ; Thu, 16 Jul 2009 08:52:38 +0200 Message-ID: <4A5ECE2D.8020500@heritageagenturen.nl> Date: Thu, 16 Jul 2009 08:52:29 +0200 From: Linda van der Pal User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: Sorting problem References: <4A5DE2D9.7080604@heritageagenturen.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MultiKabel-MailScanner-Information: Please go to http://www.multikabel.nl/contact/ for more information X-MultiKabel-MailScanner: Found to be clean X-MultiKabel-MailScanner-SpamCheck: not spam X-MultiKabel-MX-MailScanner-Information: Please go to http://www.multikabel.nl/contact/ for more information X-MailScanner-ID: 1MRKpa-0001eD-7i X-MultiKabel-MX-MailScanner: Found to be clean X-MultiKabel-MX-MailScanner-SpamCheck: X-MailScanner-From: lvdpal@heritageagenturen.nl X-Virus-Checked: Checked by ClamAV on apache.org Thanks a million, that did the trick! I had tried that before, but had probably made some other mistake then. Regards, Linda Jeff Butler wrote: > I don't think you can send the order by clause as a prepared statement > parameter. You should try string substitution instead. Also, you > don't need the tag here: > > > order by $sort$ $sortAsc$ > > > Jeff Butler > > On Wed, Jul 15, 2009 at 9:08 AM, Linda van der > Pal wrote: > >> Hello, >> >> Can anybody tell me what I'm doing wrong? I want my query to return a sorted >> list. >> >> Here are the relevant parts from my boek_SqlMap.xml (which is included in >> SqlMapConfig.xml) >> >> >> >> >> >> >> >> > /> >> >> >> >> > id="Auteurlijst"> >> >> >> >> >> >> >> >> And here is the code I am calling it with: >> List result = sqlMapClient.queryForList("boek.selectSelective", key); >> >> >> I can see in my logging that the query is called and filled with the right >> parameters: >> 2009-07-15 15:14:50,299 DEBUG [PreparedStatement] {pstm-100019} Executing >> Statement: select b.ISBN, b.Titel, b.Uitgever, b.Subgenre, b.Taal, >> b.Beschrijving, a.ID as AUTEUR_ID from boek b join boek_has_auteur a >> ON b.ISBN = a.ISBN join boek_exemplaar e on b.ISBN = e.ISBN where >> e.eigenaar = ? >> order by ? ? 2009-07-15 15:14:50,299 DEBUG >> [PreparedStatement] {pstm-100019} Parameters: [1, titel, asc] >> >> Regards, >> Linda van der Pal >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org >> For additional commands, e-mail: user-java-help@ibatis.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.375 / Virus Database: 270.13.16/2240 - Release Date: 07/15/09 17:58:00 > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org