Hi Clement

Thanks for help. One more question.
Is there any method which can give me field data type?

Thanks

Younas Aamir
htt://advcomm.net
 
 
 

try this:

import allaire.taglib.*;

....

QueryTable rsnew = (QueryTable)pageContext.getAttribute("rs");

--
Clement Wong
JRun Engineer
< a l l a i r e >

-----Original Message-----
From: Younas Aamir [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 22, 2000 2:41 AM
To: [EMAIL PROTECTED]
Subject: Re: Using jrun:sql Recordset in custom TagLib?

--------------EFB6240806D268C5BCA837A7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Clement

Thanks for your reply.

I want to get resultset like this.
ResultSet   rsnew = (ResultSet) pageContext.getAttribute("rs");

but its giving error.  Could you tell me the right way to loop over on this
resultset like

while (rsnew.next()){
     pageContext.getOut().println(rsnew.getString("Color"));
     pageContext.getOut().println("<br>");
}

Thanks.

Younas Aamir
http://advcomm.net

> You still use that while loop to traverse the recordset. You can use
> pageContext.getAttribute("rs") from within your tag handler class
> to get the recordset.
>
> --
> Clement Wong
> JRun Engineer
> < a l l a i r e >
>
> -----Original Message-----
> From: Younas Aamir [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 18, 2000 8:00 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Using jrun:sql Recordset in custom TagLib?
>
> --------------BE5706018BBA7A37F9B88955
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hi Clement
>
> Sorry if I could not explain my problem, I am developing custom TagLib
that
> is test.java, I
> took the recordset  rs in test.jsp
> and I wanted to use this taglib
> <test:test fields="Id,Color"/>
> and manipulate  these table fields in test.java
>
> Hoping now you will be understand my problem.
>
> Thanks
>
> Younas Aamir
>
> > The QueryTable is a simplified version of ResultSet (but cached). You
can
> > do something like this:
> >
> > while (rs.next()) {
> >     rs.getObject("Id");
> >     rs.getObject("Color");
> > }
> >
> > You can find out the API in the JRun Tag Library Reference (taglib.pdf)
in
> > the JRun/docs directory.
> >
> > Hope this helps.
> >
> > --
> > Clement Wong
> > JRun Engineer
> > < a l l a i r e >
> >
> > -----Original Message-----
> > From: Younas Aamir [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 17, 2000 2:53 AM
> > To: [EMAIL PROTECTED]
> > Subject: Using jrun:sql Recordset in custom TagLib?
> >
> > Hi all
> >
> > I took recordset rs using the below jsp code:
> >
> > <%@ page import="allaire.taglib.*" %>
> > <%@ taglib uri="jruntags" prefix="jrun" %>
> > <%@ taglib prefix="test" uri="test.tld" %>
> >
> > <jrun:sql driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:test"
> > id="rs">
> >  SELECT * FROM Colors
> > </jrun:sql>
> > <jrun:param id="rs" type="QueryTable"/>
> > <test:test fields="Id,Color"/>
> >
> > How could I use this recordset in a custom taglib for some fields
> > manipulation?
> > Could some one provide example code?
> >
> > Thanks.
> >
> > Younas Aamir
> >
> >
>
----------------------------------------------------------------------------
> > --
> > Archives: http://www.egroups.com/group/jrun-interest/
> > Unsubscribe:
> >
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
> > or send a message to [EMAIL PROTECTED] with
> 'unsubscribe'
> > in the body.
> >
>
----------------------------------------------------------------------------
> --
> > Archives: http://www.egroups.com/group/jrun-interest/
> > Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
> > or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
>
> --------------BE5706018BBA7A37F9B88955
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> Hi Clement
> <p>Sorry if I could not explain my problem, I am developing custom TagLib
> that is test.java, I took the recordset&nbsp; rs in test.jsp
> <br>and I wanted to use this taglib
> <br><b>&lt;test:test fields="Id,Color"/></b>
> <br>and manipulate&nbsp; these table fields in test.java
> <p>Hoping now you will be understand my problem.
> <br>&nbsp;
> <p>Thanks
> <p>Younas Aamir
> <br>&nbsp;
> <blockquote TYPE=CITE>The QueryTable is a simplified version of ResultSet
> (but cached). You can
> <br>do something like this:
> <p>while (rs.next()) {
> <br>&nbsp;&nbsp;&nbsp; rs.getObject("Id");
> <br>&nbsp;&nbsp;&nbsp; rs.getObject("Color");
> <br>}
> <p>You can find out the API in the JRun Tag Library Reference (taglib.pdf)
> in
> <br>the JRun/docs directory.
> <p>Hope this helps.
> <p>--
> <br>Clement Wong
> <br>JRun Engineer
> <br>&lt; a l l a i r e >
> <p>-----Original Message-----
> <br>From: Younas Aamir [<a
> href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</a>]
> <br>Sent: Thursday, August 17, 2000 2:53 AM
> <br>To: [EMAIL PROTECTED]
> <br>Subject: Using jrun:sql Recordset in custom TagLib?
> <p>Hi all
> <p>I took recordset rs using the below jsp code:
> <p>&lt;%@ page import="allaire.taglib.*" %>
> <br>&lt;%@ taglib uri="jruntags" prefix="jrun" %>
> <br>&lt;%@ taglib prefix="test" uri="test.tld" %>
> <p>&lt;jrun:sql driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:test"
> <br>id="rs">
> <br>&nbsp;SELECT * FROM Colors
> <br>&lt;/jrun:sql>
> <br>&lt;jrun:param id="rs" type="QueryTable"/>
> <br>&lt;test:test fields="Id,Color"/>
> <p>How could I use this recordset in a custom taglib for some fields
> <br>manipulation?
> <br>Could some one provide example code?
> <p>Thanks.
> <p>Younas Aamir
>
<p>-------------------------------------------------------------------------
> ---
> <br>--
> <br>Archives: <a
>
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
> oup/jrun-interest/</a>
> <br>Unsubscribe:
> <br><a
>
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
>
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
> n_talk</a>
> <br>or send a message to [EMAIL PROTECTED] with
> 'unsubscribe'
> <br>in the body.
>
<br>------------------------------------------------------------------------
> ------
> <br>Archives: <a
>
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
> oup/jrun-interest/</a>
> <br>Unsubscribe: <a
>
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
>
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
> n_talk</a>
> <br>or send a message to [EMAIL PROTECTED] with
> 'unsubscribe'
> in the body.</blockquote>
> </html>
>
> --------------BE5706018BBA7A37F9B88955--
>
>
----------------------------------------------------------------------------
> --
> Archives: http://www.egroups.com/group/jrun-interest/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
> or send a message to [EMAIL PROTECTED] with
'unsubscribe'
> in the body.
>
----------------------------------------------------------------------------
--
> Archives: http://www.egroups.com/group/jrun-interest/
> Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
> or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--------------EFB6240806D268C5BCA837A7
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Clement
<p>Thanks for your reply.
<p>I want to get resultset like this.
<br>ResultSet&nbsp;&nbsp; rsnew = (ResultSet)
pageContext.getAttribute("rs");
<p>but its giving error.&nbsp; Could you tell me the right way to loop
over on this resultset like
<p>while (rsnew.next()){
<br>&nbsp;&nbsp;&nbsp;&nbsp;
pageContext.getOut().println(rsnew.getString("Color"));
<br>&nbsp;&nbsp;&nbsp;&nbsp; pageContext.getOut().println("&lt;br>");
<br>}
<p>Thanks.
<p>Younas Aamir
<br><A HREF="http://advcomm.net">http://advcomm.net</A>
<br>&nbsp;
<blockquote TYPE=CITE>You still use that while loop to traverse the
recordset.
You can use
<br>pageContext.getAttribute("rs") from within your tag handler class
<br>to get the recordset.
<p>--
<br>Clement Wong
<br>JRun Engineer
<br>&lt; a l l a i r e >
<p>-----Original Message-----
<br>From: Younas Aamir [<a
href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</a>]
<br>Sent: Friday, August 18, 2000 8:00 AM
<br>To: [EMAIL PROTECTED]
<br>Subject: Re: Using jrun:sql Recordset in custom TagLib?
<p>--------------BE5706018BBA7A37F9B88955
<br>Content-Type: text/plain; charset=us-ascii
<br>Content-Transfer-Encoding: 7bit
<p>Hi Clement
<p>Sorry if I could not explain my problem, I am developing custom TagLib
that
<br>is test.java, I
<br>took the recordset&nbsp; rs in test.jsp
<br>and I wanted to use this taglib
<br>&lt;test:test fields="Id,Color"/>
<br>and manipulate&nbsp; these table fields in test.java
<p>Hoping now you will be understand my problem.
<p>Thanks
<p>Younas Aamir
<p>> The QueryTable is a simplified version of ResultSet (but cached).
You can
<br>> do something like this:
<br>>
<br>> while (rs.next()) {
<br>>&nbsp;&nbsp;&nbsp;&nbsp; rs.getObject("Id");
<br>>&nbsp;&nbsp;&nbsp;&nbsp; rs.getObject("Color");
<br>> }
<br>>
<br>> You can find out the API in the JRun Tag Library Reference
(taglib.pdf)
in
<br>> the JRun/docs directory.
<br>>
<br>> Hope this helps.
<br>>
<br>> --
<br>> Clement Wong
<br>> JRun Engineer
<br>> &lt; a l l a i r e >
<br>>
<br>> -----Original Message-----
<br>> From: Younas Aamir [<a
href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</a>]
<br>> Sent: Thursday, August 17, 2000 2:53 AM
<br>> To: [EMAIL PROTECTED]
<br>> Subject: Using jrun:sql Recordset in custom TagLib?
<br>>
<br>> Hi all
<br>>
<br>> I took recordset rs using the below jsp code:
<br>>
<br>> &lt;%@ page import="allaire.taglib.*" %>
<br>> &lt;%@ taglib uri="jruntags" prefix="jrun" %>
<br>> &lt;%@ taglib prefix="test" uri="test.tld" %>
<br>>
<br>> &lt;jrun:sql driver="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:test"
<br>> id="rs">
<br>>&nbsp; SELECT * FROM Colors
<br>> &lt;/jrun:sql>
<br>> &lt;jrun:param id="rs" type="QueryTable"/>
<br>> &lt;test:test fields="Id,Color"/>
<br>>
<br>> How could I use this recordset in a custom taglib for some fields
<br>> manipulation?
<br>> Could some one provide example code?
<br>>
<br>> Thanks.
<br>>
<br>> Younas Aamir
<br>>
<br>>
<br>------------------------------------------------------------------------
----
<br>> --
<br>> Archives: <a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>
<br>> Unsubscribe:
<br>> <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
n_talk</a>
<br>> or send a message to [EMAIL PROTECTED] with
<br>'unsubscribe'
<br>> in the body.
<br>>
<br>------------------------------------------------------------------------
----
<br>--
<br>> Archives: <a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>
<br>> Unsubscribe:
<br><a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
n_talk</a>
<br>> or send a message to [EMAIL PROTECTED] with
<br>'unsubscribe' in the body.
<p>--------------BE5706018BBA7A37F9B88955
<br>Content-Type: text/html; charset=us-ascii
<br>Content-Transfer-Encoding: 7bit
<p>&lt;!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<br>&lt;html>
<br>Hi Clement
<br>&lt;p>Sorry if I could not explain my problem, I am developing custom
TagLib
<br>that is test.java, I took the recordset&amp;nbsp; rs in test.jsp
<br>&lt;br>and I wanted to use this taglib
<br>&lt;br>&lt;b>&amp;lt;test:test fields="Id,Color"/>&lt;/b>
<br>&lt;br>and manipulate&amp;nbsp; these table fields in test.java
<br>&lt;p>Hoping now you will be understand my problem.
<br>&lt;br>&amp;nbsp;
<br>&lt;p>Thanks
<br>&lt;p>Younas Aamir
<br>&lt;br>&amp;nbsp;
<br>&lt;blockquote TYPE=CITE>The QueryTable is a simplified version of
ResultSet
<br>(but cached). You can
<br>&lt;br>do something like this:
<br>&lt;p>while (rs.next()) {
<br>&lt;br>&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.getObject("Id");
<br>&lt;br>&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.getObject("Color");
<br>&lt;br>}
<br>&lt;p>You can find out the API in the JRun Tag Library Reference
(taglib.pdf)
<br>in
<br>&lt;br>the JRun/docs directory.
<br>&lt;p>Hope this helps.
<br>&lt;p>--
<br>&lt;br>Clement Wong
<br>&lt;br>JRun Engineer
<br>&lt;br>&amp;lt; a l l a i r e >
<br>&lt;p>-----Original Message-----
<br>&lt;br>From: Younas Aamir [&lt;a
<br>href="<a
href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</a>"><a
href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</a>&lt;/a>]
<br>&lt;br>Sent: Thursday, August 17, 2000 2:53 AM
<br>&lt;br>To: [EMAIL PROTECTED]
<br>&lt;br>Subject: Using jrun:sql Recordset in custom TagLib?
<br>&lt;p>Hi all
<br>&lt;p>I took recordset rs using the below jsp code:
<br>&lt;p>&amp;lt;%@ page import="allaire.taglib.*" %>
<br>&lt;br>&amp;lt;%@ taglib uri="jruntags" prefix="jrun" %>
<br>&lt;br>&amp;lt;%@ taglib prefix="test" uri="test.tld" %>
<br>&lt;p>&amp;lt;jrun:sql driver="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:test"
<br>&lt;br>id="rs">
<br>&lt;br>&amp;nbsp;SELECT * FROM Colors
<br>&lt;br>&amp;lt;/jrun:sql>
<br>&lt;br>&amp;lt;jrun:param id="rs" type="QueryTable"/>
<br>&lt;br>&amp;lt;test:test fields="Id,Color"/>
<br>&lt;p>How could I use this recordset in a custom taglib for some fields
<br>&lt;br>manipulation?
<br>&lt;br>Could some one provide example code?
<br>&lt;p>Thanks.
<br>&lt;p>Younas Aamir
<br>&lt;p>------------------------------------------------------------------
-------
<br>---
<br>&lt;br>--
<br>&lt;br>Archives: &lt;a
<br>href="<a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>"><a
href="http://www.egroups.com/gr">http://www.egroups.com/gr</a>
<br>oup/jrun-interest/&lt;/a>
<br>&lt;br>Unsubscribe:
<br>&lt;br>&lt;a
<br>href="<a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jrun_t
</a>
<br>alk"><a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jr
u">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;amp;body=lists/j
ru</a>
<br>n_talk&lt;/a>
<br>&lt;br>or send a message to [EMAIL PROTECTED] with
<br>'unsubscribe'
<br>&lt;br>in the body.
<br>&lt;br>-----------------------------------------------------------------
-------
<br>------
<br>&lt;br>Archives: &lt;a
<br>href="<a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>"><a
href="http://www.egroups.com/gr">http://www.egroups.com/gr</a>
<br>oup/jrun-interest/&lt;/a>
<br>&lt;br>Unsubscribe: &lt;a
<br>href="<a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jrun_t
</a>
<br>alk"><a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jr
u">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;amp;body=lists/j
ru</a>
<br>n_talk&lt;/a>
<br>&lt;br>or send a message to [EMAIL PROTECTED] with
<br>'unsubscribe'
<br>in the body.&lt;/blockquote>
<br>&lt;/html>
<p>--------------BE5706018BBA7A37F9B88955--
<p>-------------------------------------------------------------------------
---
<br>--
<br>Archives: <a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>
<br>Unsubscribe:
<br><a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
n_talk</a>
<br>or send a message to [EMAIL PROTECTED] with
'unsubscribe'
<br>in the body.
<br>------------------------------------------------------------------------
------
<br>Archives: <a
href="http://www.egroups.com/group/jrun-interest/">http://www.egroups.com/gr
oup/jrun-interest/</a>
<br>Unsubscribe: <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_t
alk">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/jru
n_talk</a>
<br>or send a message to [EMAIL PROTECTED] with
'unsubscribe'
in the body.</blockquote>
</html>

--------------EFB6240806D268C5BCA837A7--

----------------------------------------------------------------------------
--
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to