Bonjour à tous,

J'ai un problème à l'exécution de mon application. Elle m'indique l'erreur :
org.postgresql.util.PSQLException: Le ResultSet n'est pas positionné correctement, vous devez peut-être appeler next()
Mon code où se trouve l'erreur est le suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	public static void Predir(long iduser)
	{
		long topk[]=SelectionTPK(iduser);
		//int k=0,j=0;
		try{k=0;
			St = ConnexionDB.Con.createStatement();
			rs =(ResultSet)St.executeQuery("SELECT * FROM fiche_evaluation WHERE id_user='"+iduser+"'");
 
			while(rs.next()){
				for(int i=0;i<idtopk.length;i++)
			     {
			           if(rs.next()) rs1 =(ResultSet)St.executeQuery
			         			       ("SELECT * FROM fiche_evaluation WHERE id_user='"+topk[i]+"' AND id_hotel!='"+rs.getLong(2)+"'");
					    while(rs1.next())
				    	{
 
						grapheagrégé(iduser, rs1.getLong(2));
                        pred[0][k]=rs1.getLong(2);//l'hotel prédit
                        pred[1][k]=calculernotepredit(grapheagrégé(iduser, rs1.getLong(2)));//sa note prédite
                        k++;	
					    }
 
				  }
				 System.out.print("llllllllllllllll");  
 
			}			
 
 
			recommande(pred);
 
		}
		catch ( SQLException e ) {
			 throw new DAOException( e );
			                         }
	}

MERCI d'avance