0
I need to get all the records from a table from a script
in Groovy, but with the script
that I created it is taking only one record of each column and out of order too. Mine script
this way:
List result = new ArrayList();
def i = 1;
while (resultset.next()){
List sousListe = new ArrayList();
sousListe.add(resultset.getString(i));
result.add(sousListe);
i = i + 1;
}
return result;
Initially he took only all the records of the first column, give for that mine script
was like this:
List result = new ArrayList();
while (resultset.next()){
List sousListe = new ArrayList();
sousListe.add(resultset.getString(1));
result.add(sousListe);
}
return result;
So I thought if I created a variable that would be implemented in my while
it would go through all the columns of my table but only the error that changed.