ResultSet res = null;
try {
smt = connection.createStatement();
res = smt.executeQuery("select idTypeChrgVoit, descripTypeChrgVoit, nbUniteChrg, ttypeunite.idTypeUnite, ttypeunite.descripTypeUnite from ttypechargevoiture, ttypeunite where ttypechargevoiture.idTypeUnite = ttypeunite.idTypeUnite and idTypeChrgVoit = LAST_INSERT_ID()");
if (res.next()) {
result[0] = new TypeCharge(res.getInt(1));
result[0].setLibelle(res.getString(2));
result[0].setNbUnite(res.getInt(3));
TypeUnite typeUnite = new TypeUnite(res.getInt(4));
typeUnite.setLibelle(res.getString(5));