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.

Reply via email to