Hi all !
I am trying to find a way to return repeat data in a JSP page from a java bean.
I found a way that is described on the Allaire JRUN web site which consists in using 
the java bean to return a recordset.
The bean is instantiated from the JSP page using a session context.
Then a resultset variable is declared and initialized by calling a function from the 
bean as follow:
<%! ResultSet rs; %>
<% rs = myBean.initializeRepeatBean0011(); %>
<% while ( rs.next() )
{
%>
HTML and java code embedded here
<%
}
 if (rs!=null) {
rs.close();
}
%>

What happens is that if the while loop is not there, everything works perfectly 
although obviously no data shows on the returned page.
If I add the While (rs.next()) { } loop without any code in the middle I get a SQL 
exception error that indicate a "Cursor state not valid".

Does somebody have an idea what I am doing wrong?
And is there another way to handle repeat data?
Any help will be greatly appreciated,
Pascal BLANC.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to