Juego de resultados cerrado: next
Publicado por deysi (11 intervenciones) el 20/03/2009 02:28:03
Quisiera saber porque me envia este mensaje
Caused by: java.sql.SQLException: Juego de resultados cerrado: next
String qryError = "SELECT ic_linea, cg_error FROM paastmp_plan_anual WHERE ic_proceso=?";
ps1 = con.queryPrecompilado(qryError);
ps1.setInt(1, seqNEXTVAL);
rs1 = ps1.executeQuery();
PreparedStatement pspor = null;
ResultSet rspor = null;
String primer = "";
String segundo = "";
String tercero = "";
String cuarto = "";
String lineaa = "";
int porceb = 0;
String qrypor = " SELECT ig_tri_primer PRIMER, ig_tri_segundo SEGUNDO, ig_tri_tercero TERCERO, ig_tri_cuarto CUARTO "+
" FROM paastmp_plan_anual WHERE ic_proceso = ? AND ic_linea = ? ";
pspor = con.queryPrecompilado(qrypor);
while(rs1.next()) {
lineaa = rs1.getString("ic_linea")==null?"":rs1.getString("ic_linea");
String linea = rs1.getString("ic_linea");
String error = rs1.getString("cg_error");
pspor.clearParameters();
pspor.setInt(1,seqNEXTVAL);
pspor.setString(2,lineaa);
rspor = pspor.executeQuery();
if (rspor.next()) {
primer = rspor.getString("PRIMER")==null?"":rspor.getString("PRIMER");
segundo = rspor.getString("SEGUNDO")==null?"":rspor.getString("SEGUNDO");
tercero = rspor.getString("TERCERO")==null?"":rspor.getString("TERCERO");
cuarto = rspor.getString("CUARTO")==null?"":rspor.getString("CUARTO");
porceb = Integer.parseInt(primer) + Integer.parseInt(segundo) + Integer.parseInt(tercero) + Integer.parseInt(cuarto) ;
if (error != null && !error.equals("") && (porceb >100) ) {
listaErrores.add("Linea " + linea + " " + error + new Integer(porceb)+"%"+" El porcentaje no debe de ser Mayor a 100%");
} else {
listaCorrectas.add("Linea " + linea);
}
}
rs1.close();
}
log.debug(" LISTA_CORRECTAS----" +listaCorrectas);
log.debug(" LISTA_INCORRECTAS----" +listaErrores);
rspor.close();
pspor.close();
ps1.close(); //seqNEXTVAL
Caused by: java.sql.SQLException: Juego de resultados cerrado: next
String qryError = "SELECT ic_linea, cg_error FROM paastmp_plan_anual WHERE ic_proceso=?";
ps1 = con.queryPrecompilado(qryError);
ps1.setInt(1, seqNEXTVAL);
rs1 = ps1.executeQuery();
PreparedStatement pspor = null;
ResultSet rspor = null;
String primer = "";
String segundo = "";
String tercero = "";
String cuarto = "";
String lineaa = "";
int porceb = 0;
String qrypor = " SELECT ig_tri_primer PRIMER, ig_tri_segundo SEGUNDO, ig_tri_tercero TERCERO, ig_tri_cuarto CUARTO "+
" FROM paastmp_plan_anual WHERE ic_proceso = ? AND ic_linea = ? ";
pspor = con.queryPrecompilado(qrypor);
while(rs1.next()) {
lineaa = rs1.getString("ic_linea")==null?"":rs1.getString("ic_linea");
String linea = rs1.getString("ic_linea");
String error = rs1.getString("cg_error");
pspor.clearParameters();
pspor.setInt(1,seqNEXTVAL);
pspor.setString(2,lineaa);
rspor = pspor.executeQuery();
if (rspor.next()) {
primer = rspor.getString("PRIMER")==null?"":rspor.getString("PRIMER");
segundo = rspor.getString("SEGUNDO")==null?"":rspor.getString("SEGUNDO");
tercero = rspor.getString("TERCERO")==null?"":rspor.getString("TERCERO");
cuarto = rspor.getString("CUARTO")==null?"":rspor.getString("CUARTO");
porceb = Integer.parseInt(primer) + Integer.parseInt(segundo) + Integer.parseInt(tercero) + Integer.parseInt(cuarto) ;
if (error != null && !error.equals("") && (porceb >100) ) {
listaErrores.add("Linea " + linea + " " + error + new Integer(porceb)+"%"+" El porcentaje no debe de ser Mayor a 100%");
} else {
listaCorrectas.add("Linea " + linea);
}
}
rs1.close();
}
log.debug(" LISTA_CORRECTAS----" +listaCorrectas);
log.debug(" LISTA_INCORRECTAS----" +listaErrores);
rspor.close();
pspor.close();
ps1.close(); //seqNEXTVAL
Valora esta pregunta
0