Thanx again Chris, I'll try this now..



From: Christian Haul <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Mauro Velasco <[EMAIL PROTECTED]>
Subject: Re: ESQL - select * from any_table
Date: Mon, 6 Aug 2001 19:26:50 +0200
MIME-Version: 1.0
Received: from [130.83.126.41] by hotmail.com (3.2) with ESMTP id 
MHotMailBD381E5C00A8400438E682537E2990450; Mon, 06 Aug 2001 10:26:53 -0700
Received: from london (london.dvs1.informatik.tu-darmstadt.de 
[130.83.27.27])by mailserver1.hrz.tu-darmstadt.de (8.9.1a/8.9.1) with ESMTP 
id TAA20372for <[EMAIL PROTECTED]>; Mon, 6 Aug 2001 19:25:47 +0200 (MET 
DST)
Received: by london (Postfix, from userid 11012)id 21B0316487; Mon,  6 Aug 
2001 19:26:51 +0200 (MET DST)
>From [EMAIL PROTECTED] Mon, 06 Aug 2001 10:28:34 -0700
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.2i
In-Reply-To: <[EMAIL PROTECTED]>; from 
[EMAIL PROTECTED] on Mon, Aug 06, 2001 at 11:43:25AM -0500
Organization: Databases and Distributed Systems Group, Darmstadt University 
of Technology

On 06.Aug.2001 -- 11:43 AM, Mauro Velasco wrote:
 > Thanks Chris for answer.
 >
 > Exist a way to know the number of columns to be retrieved for a esql 
query
 > (typically a select * from table_name) and how can i pass it to the 
columns
 > definition. Or can suggest my a way to make this query on tomcat cocoon
 > environment..

Yes, <esql:get-column-count/> does it. Thus

      <esql:row-results>
         <tr>
            <xsp:logic>
              for (int i=0; i &lt; <esql:get-column-count/>; i++) {
                 <td><esql:get-column><esql:param 
name="column"><xsp:expr>i</xsp:expr></esql:param/></td>
               }
            </xsp:logic>
        </tr>
      </esql:row-results>

would output all columns in a table. But for this you could also do

      <esql:row-results>
         <tr>
           <esql:get-columns/>
        </tr>
      </esql:row-results>

which would produce a similar result (not the same, as ex.2 does not
use <td/> tags but column names... so the result would need to be
transformed properly)

        Chris.

--
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to