Problème JDBC

Fermé
serenity - 30 mars 2012 à 01:18
Bonjour,

Je dois insérer des données après parsing d'un fichier texte dans une table Mysql (17 champs)
le code s'exécute mais rien n'est stocké dans ma table , veuillez bien me dire c quoi le problème ?

voici main de ma classe


public static void main(String...args) throws Exception
{

//lecture du fichier txt par un scanner
Scanner sc = new Scanner(new File("201202139459.txt.txt"));
sc.nextLine();

String str = sc.nextLine();

if(SQL.connect()){

while (sc.hasNextLine())
{
try{
int[] tailles = {15,2,24,24,14,14,3,5,3,4,1,2,1,24,24,24};

String[] tab = decouper(str,tailles);
Statement statement = conn.createStatement();
// statement.executeUpdate( "INSERT into CDRrecord " + " values ( 1,2,3,5,7,8,9,1,2,1,2,3,5,7,8)");}catch(Exception e){}

statement.executeUpdate( "INSERT into CDRrecord " + " VALUES ('" + tab[0] + "','" + tab[1] + "', '" + tab[2] + "','" + tab[3] + "','" + tab[4] + "','" + tab[5] + "','" + tab[6] + "','" + tab[7] + "','" + tab[8] + "','" + tab[9] + "','" + tab[10] + "','" + tab[11] + "','" + tab[12] + "','" + tab[13] + "','" + tab[14] + "','" + tab[15] + "','" + tab[16] + "')");
}catch(Exception e){}
str = sc.nextLine();}

sc.close();
SQL.disconnect();
}}}


Merci