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
| public void RecuperLesChamps() throws SQLException{
bdd.lire("SELECT * FROM fichiercomplet");
ResultSetMetaData resultMeta = (ResultSetMetaData) bdd.resultat.getMetaData();
String Values ;
Values="";
//System.out.println(resultMeta.getColumnCount());
int i = 1;
int j = 0;
while(bdd.resultat.next()){
Values = "'"+bdd.resultat.getObject(1).toString()+"'," + "'"+bdd.resultat.getObject(9).toString()+"',"+
"'"+bdd.resultat.getObject(4).toString()+"'," + "'"+bdd.resultat.getObject(3).toString()+"',"+
"'"+bdd.resultat.getObject(10).toString()+"',"+ "'"+bdd.resultat.getObject(2).toString()+"',"+
"'"+bdd.resultat.getObject(14).toString()+"'";
bdd.miseAJour("insert into table_transaction_journal values ("+Values+")");
System.out.println("Insertion de la ligne n° "+i+" Réussi \n");
i++;
}
} |
Partager