Bonjour

Quelqu'un pourrait-il m'aider ?

Mon code:
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
 
...	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) + "')");
	}
Mes colonnes sont de type:
INT(11)
INT(11)
CHAR(1)
DATETIME
DATETIME
VARCHAR(2)

et il me dit ceci:
data2.getValueAt(l,0) =38385
data2.getValueAt(l,1) =116424
data2.getValueAt(l,2) =1
data2.getValueAt(l,3) =14/10/10
data2.getValueAt(l,4) =14/10/10
data2.getValueAt(l,5) =null
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near '', '14/10/10', '14/10/10', '9')' at line 1
merci d'avance