1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| while (((strLine1 = br.readLine()) != null) && ((strLine2 = br.readLine()) != null) && ((message = bir.readLine()) != null)) {
String fichier = strLine1;
String user = strLine2;
String msg = message.toString();
int idForum = Integer.parseInt(generateRandomCode(5));
Connection conn = Util.getInstance();
java.sql.Statement stm = conn.createStatement();
// System.out.println(idForum +" ; "+ fichier + " ; " + user + " ; " + msg);
int executeUpdate = stm.executeUpdate("INSERT INTO AnalyseForum (nomDocument, codeDiscution, membreNom, membreDiscution) VALUES ( ' " + fichier + " " + idForum + " " + user +" " + msg +"' )");
conn.commit();
stm.close();
} |
Partager