Variables en un while
Publicado por JJ (45 intervenciones) el 30/01/2002 22:11:24
Hola
Tengo un while donde quiero declarar 2 variables, pero al hacerlo me sale un error:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
El código es este=
<%
Statement stmt2 = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rsTable2 = stmt2.executeQuery("SELECT DISTINCT(DEPT2) FROM TBDISTR WHERE DEPT1 LIKE '"+selectedbox1+"'");
while (rsTable2.next())
{
String DBdept1=rsTable2.getString("dept1");
String DBdept2=rsTable2.getString("dept2");
out.println("<option>"+DBdept2+"</option>");
}%>
Espero me puedan ayudar
Gracias
JJ
Tengo un while donde quiero declarar 2 variables, pero al hacerlo me sale un error:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
El código es este=
<%
Statement stmt2 = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rsTable2 = stmt2.executeQuery("SELECT DISTINCT(DEPT2) FROM TBDISTR WHERE DEPT1 LIKE '"+selectedbox1+"'");
while (rsTable2.next())
{
String DBdept1=rsTable2.getString("dept1");
String DBdept2=rsTable2.getString("dept2");
out.println("<option>"+DBdept2+"</option>");
}%>
Espero me puedan ayudar
Gracias
JJ
Valora esta pregunta


0