Hi!
I have found that I can't ask the same Recordset field two times with
getString() or equals. I get the SQL exception "no Data" on second try. Is
this a rule or a mistake on my side?
here is some code where it happens:
try {
String RSTB3000_Query = "SELECT ROUTING_AREA FROM TRADIUS.RSTB3000";
rs = stmt.executeQuery(RSTB3000_Query);
while(rs.next())
{
String selektiert = "";
String Typ = rs.getString("ROUTING_AREA");
if (Typ == "AGB ")
{
selektiert = " selected";
}
out.println("\t\t\t\t<option value=\"" + Typ + selektiert
+ "\">" + Typ);
}
rs.close();
} catch(SQLException ex) {
out.println("SQLException: " + ex.getMessage());
}
As you can see, I now create a String variable 'Typ' with the content of
ROUTING_AREA, for not getting that error, but if I replace 'Typ' with
rs.getString("ROUTING_AREA"), after second appearance I got 'no data'.
===========================================================================
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