this might help you
RS is a RecordSet
<table width=100% cellpadding=1 cellspacing=0 border=0>
<% int counter=0,col=0;
try{
String bgcolor="eeeeee";
ResultSetMetaData rsa;
rsa=RS.getMetaData();
col=rsa.getColumnCount();
%>
<tr bgcolor=<%=bgcolor %>>
<Td><font face='Arial' size=2 color=#000000>Count</font></td>
<%
for(int i=1;i<col+1;i++){
out.println("<td><font face='Arial' size=2
color=#000000>"+(i)+",</td>");
}
%>
</tr> <tr bgcolor=<%=bgcolor %>>
<Td><font face='Arial' size=2 color=#000000>Name</font></td>
<%
for(int i=1;i<col+1;i++){
out.println("<td><font face='Arial' size=2
color=#000000>"+rsa.getColumnName(i)+",</td>");
}
%>
</tr> <tr bgcolor=<%=bgcolor %>>
<Td><font face='Arial' size=2 color=#000000>Name</font></td>
<%
for(int i=1;i<col+1;i++){
out.println("<td><font face='Arial' size=2
color=#000000>"+rsa.getColumnTypeName(i)+",</td>");
}
%>
</tr>
<%
while(RS.next()){
counter++;
bgcolor=(bgcolor=="eeeeee")?"ffffff":"eeeeee";
%> <tr bgcolor=<%=bgcolor %>>
<td><%=counter %></td>
<%
for(int i=1;i<col+1;i++){
out.println("<td><font face='Arial' size=2
color=#000000>"+RS.getString(i)+"</td>");
}
if(counter>2200){ break;}
%>
</tr>
<% }
}catch(Exception e){
out.println("Error Ocurrred working with ResultSet"+e);
}
%>
</table>
Macmahon Conor <[EMAIL PROTECTED]> on 10/21/99 01:08:55 PM
Please respond to Macmahon Conor <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Ricardo Bosch/CHASE)
Subject: Re: API Question
Hi John,
Have you looked at the Microsoft Duwamish Sample Code, Phase 4? It
has a Workflow object that takes in an ADO RecordSet and produces the
equivalent string representation in XML. You could port this logic over to
Java if you have no other leads.
Regards,
Conor.
-----Original Message-----
From: John Sprecher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 20, 1999 5:29 PM
To: [EMAIL PROTECTED]
Subject: API Question
Hi All,
We are using JSP(presentation) with servlets(authentication,DB
pool,statistics)and java classes that holds business logic. However we don't
have generic html package that could take ResultSet or any other type of
Collection and convert it to html table.
Does any of you aware about any existing designs or APIs?
Thanks in advance.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html