Hi do you know how to solve the invalid cursor state error I am getting on this code. I am actually trying to do a query inside another query. thanks for your help public synchronized Vector getafacturer( Remote handle) throws java.rmi.RemoteException { try{ Statement st2 = initTransaction(handle);
query2= " SELECT NoProjet, Expr1 FROM heurestravaillees";
System.out.println("SQL: " + query2); ResultSet rs2 = st2.executeQuery(query2); //infos.heurestravaillees= rs2.getDouble("Expr1"); //ajoute les factures a la liste while(rs2.next()) { afacturerinfos infos = new afacturerinfos();
infos.noprojet = rs2.getString("NoProjet"); Long noproj = new Long (infos.noprojet); //System.out.println(noproj); infos.heurestravaillees= rs2.getDouble("Expr1");
query1 = "SELECT DISTINCT Facture.NoProjet, Sum(FactureDetail.HeuresFacture) AS Sumhf " + "FROM Facture INNER JOIN FactureDetail ON Facture.NoFacture = FactureDetail.NoFacture " + "WHERE Facture.NoProjet =" +noproj+ " GROUP BY Facture.NoProjet";