1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
... private DefaultTableModel data2;
...
for (int l = 0; l <= data2.getRowCount()-1; l++)
{
System.out.println("no lig de data2 lue=" + l);
System.out.println("data2.getValueAt(l,0) =" + data2.getValueAt(l,0));
System.out.println("data2.getValueAt(l,1) =" + data2.getValueAt(l,1));
System.out.println("data2.getValueAt(l,2) =" + data2.getValueAt(l,2));
System.out.println("data2.getValueAt(l,3) =" + data2.getValueAt(l,3));
System.out.println("data2.getValueAt(l,4) =" + data2.getValueAt(l,4));
System.out.println("data2.getValueAt(l,5) =" + data2.getValueAt(l,5));
int i = 0;
int k = statement.executeUpdate("INSERT INTO `tabletemp`.`operatoto` " +
"(`id` ,`colonneA` ,`colonneB` ,`colonneC` ,`colonneD` ,`colonneE`) " +
"VALUES ('" + data2.getValueAt(l,0) +
"', '" + data2.getValueAt(l,1) +
"', '" + data2.getValueAt(l,2) +
"', '" + data2.getValueAt(l,3) +
"', '" + data2.getValueAt(l,4) +
"', CASE '" + data2.getValueAt(l,5) + "' WHEN 'null' THEN '' ELSE '" + data2.getValueAt(l,5) + "')");
} |
Partager