Pas de modification

Messages postés
28
Date d'inscription
mardi 14 octobre 2003
Statut
Membre
Dernière intervention
3 septembre 2006
-
Messages postés
28
Date d'inscription
mardi 14 octobre 2003
Statut
Membre
Dernière intervention
3 septembre 2006
-
Bonjour,

J'ai crée un programme de gestion mais malheureusement j'ai un petit probleme pour la modification, elle ne modifie aucune donnée des champs de ma base de donnée. Je comprends pas, je n'ai aucun signale d'erreur de SQL ou de code.
Voici le code pour sélectionner :

<hr size="2" width="100%" />procedure TEnreg_DGT4_BIS.BitBtn1Click(Sender: TObject);
begin
  DGT4_BIS.BitBtn7.Visible := false;
  DGT4_BIS.BitBtn7.Enabled := false;
  DGT4_BIS.BitBtn10.Visible := true;
  DGT4_BIS.BitBtn10.Enabled := true;
  DGT4_BIS.Edit20.Text := DataModule5.ADOQuery2.FieldByname('NOM').AsString;
  Oldtype := DataModule5.ADOQuery2.FieldByname('NOM').AsString;
  DGT4_BIS.Edit21.Text := DataModule5.ADOQuery2.FieldByname('PRENOM').AsString;
  Oldtype1 := DataModule5.ADOQuery2.FieldByname('PRENOM').AsString;
  DGT4_BIS.Edit22.Text := DataModule5.ADOQuery2.FieldByname('ADRESSE').AsString;
  Oldtype2 := DataModule5.ADOQuery2.FieldByname('ADRESSE').AsString;
  DGT4_BIS.Edit23.Text := DataModule5.ADOQuery2.FieldByname('CODE_POSTAL').AsString;
  Oldtype3 := DataModule5.ADOQuery2.FieldByname('CODE_POSTAL').AsString;
  DGT4_BIS.Edit24.Text := DataModule5.ADOQuery2.FieldByname('LOCALITE').AsString;
  Oldtype4 := DataModule5.ADOQuery2.FieldByname('LOCALITE').AsString;
  DGT4_BIS.Edit25.Text := DataModule5.ADOQuery2.FieldByname('DATE_1').AsString;
  Oldtype5 := DataModule5.ADOQuery2.FieldByname('DATE_1').AsString;
  DGT4_BIS.Edit26.Text := DataModule5.ADOQuery2.FieldByname('MATRICULE').AsString;
  Oldtype6 := DataModule5.ADOQuery2.FieldByname('MATRICULE').AsString;
  DGT4_BIS.Edit27.Text := DataModule5.ADOQuery2.FieldByname('TELEPHONE').AsString;
  Oldtype7 := DataModule5.ADOQuery2.FieldByname('TELEPHONE').AsString;
  DGT4_BIS.Edit19.Text := DataModule5.ADOQuery2.FieldByname('JUSTIFICATION').AsString;
  Oldtype8 := DataModule5.ADOQuery2.FieldByname('JUSTIFICATION').AsString;

  DGT4_BIS.Edit1.Text := DataModule5.ADOQuery2.FieldByname('ID_FONCTION_1').AsString;
  Oldtype9 := DataModule5.ADOQuery2.FieldByname('ID_FONCTION_1').AsString;
  DGT4_BIS.Edit2.Text := DataModule5.ADOQuery2.FieldByname('FONCTION_1').AsString;
  Oldtype10 := DataModule5.ADOQuery2.FieldByname('FONCTION_1').AsString;
  DGT4_BIS.Edit3.Text := DataModule5.ADOQuery2.FieldByname('COURS_1').AsString;
  Oldtype11 := DataModule5.ADOQuery2.FieldByname('COURS_1').AsString;
  DGT4_BIS.Edit4.Text := DataModule5.ADOQuery2.FieldByname('NIVEAU_1').AsString;
  Oldtype12 := DataModule5.ADOQuery2.FieldByname('NIVEAU_1').AsString;

  DGT4_BIS.Edit5.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_11').AsString;
  Oldtype13 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_11').AsString;
  DGT4_BIS.Edit30.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_22').AsString;
  Oldtype14 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_22').AsString;
  DGT4_BIS.Edit31.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_33').AsString;
  Oldtype15 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_33').AsString;
  DGT4_BIS.Edit6.Text := DataModule5.ADOQuery2.FieldByname('PERIODES_1').AsString;
  Oldtype16 := DataModule5.ADOQuery2.FieldByname('PERIODES_1').AsString;
  DGT4_BIS.Edit7.Text := DataModule5.ADOQuery2.FieldByname('NIVEAU_11').AsString;
  Oldtype17 := DataModule5.ADOQuery2.FieldByname('NIVEAU_11').AsString;
  DGT4_BIS.Edit28.Text := DataModule5.ADOQuery2.FieldByname('ANNEE_ETUDE_1').AsString;
  Oldtype18 := DataModule5.ADOQuery2.FieldByname('ANNEE_ETUDE_1').AsString;
  DGT4_BIS.Edit8.Text := DataModule5.ADOQuery2.FieldByname('DATE_DEBUT_1').AsString;
  Oldtype19 := DataModule5.ADOQuery2.FieldByname('DATE_DEBUT_1').AsString;
  DGT4_BIS.Edit9.Text := DataModule5.ADOQuery2.FieldByname('DATE_FIN_1').AsString;
  Oldtype20 := DataModule5.ADOQuery2.FieldByname('DATE_FIN_1').AsString;

  DGT4_BIS.Edit10.Text := DataModule5.ADOQuery2.FieldByname('ID_FONCTION').AsString;
  Oldtype21 := DataModule5.ADOQuery2.FieldByname('ID_FONCTION').AsString;
  DGT4_BIS.Edit11.Text := DataModule5.ADOQuery2.FieldByname('FONCTION').AsString;
  Oldtype22 := DataModule5.ADOQuery2.FieldByname('FONCTION').AsString;
  DGT4_BIS.Edit12.Text := DataModule5.ADOQuery2.FieldByname('COURS').AsString;
  Oldtype23 := DataModule5.ADOQuery2.FieldByname('COURS').AsString;
  DGT4_BIS.Edit13.Text := DataModule5.ADOQuery2.FieldByname('NIVEAU').AsString;
  Oldtype24 := DataModule5.ADOQuery2.FieldByname('NIVEAU').AsString;

  DGT4_BIS.Edit14.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_1').AsString;
  Oldtype25 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_1').AsString;
  DGT4_BIS.Edit32.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_2').AsString;
  Oldtype26 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_22').AsString;
  DGT4_BIS.Edit33.Text := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_3').AsString;
  Oldtype27 := DataModule5.ADOQuery2.FieldByname('NATURE_COURS_3').AsString;
  DGT4_BIS.Edit15.Text := DataModule5.ADOQuery2.FieldByname('PERIODES').AsString;
  Oldtype28 := DataModule5.ADOQuery2.FieldByname('PERIODES').AsString;
  DGT4_BIS.Edit16.Text := DataModule5.ADOQuery2.FieldByname('NIVEAU_2').AsString;
  Oldtype29 := DataModule5.ADOQuery2.FieldByname('NIVEAU_2').AsString;
  DGT4_BIS.Edit29.Text := DataModule5.ADOQuery2.FieldByname('ANNEE_ETUDE').AsString;
  Oldtype30 := DataModule5.ADOQuery2.FieldByname('ANNEE_ETUDE').AsString;
  DGT4_BIS.Edit17.Text := DataModule5.ADOQuery2.FieldByname('DATE_DEBUT').AsString;
  Oldtype31 := DataModule5.ADOQuery2.FieldByname('DATE_DEBUT').AsString;
  DGT4_BIS.Edit18.Text := DataModule5.ADOQuery2.FieldByname('DATE_FIN').AsString;
  Oldtype32 := DataModule5.ADOQuery2.FieldByname('DATE_FIN').AsString;
  BFermer.Click;
end;
<hr size="2" width="100%" />Voici le code pour modifier :
<hr size="2" width="100%" />
procedure TDGT4_bis.BitBtn10Click(Sender: TObject);
begin
  DGT4_BIS.BitBtn7.Visible := true;
  DGT4_BIS.BitBtn7.Enabled := true;
  DGT4_BIS.BitBtn10.Visible := false;
  DGT4_BIS.BitBtn10.Enabled := false;
  with DataModule5.ADOQuery2 do
    begin // Ici on modifie les champs sélectionner
      SQL.Clear;
      SQL.Add('Update DGT4_BIS set NOM=:Nom, PRENOM=:Prenom, ADRESSE=:Adresse, CODE_POSTAL=:Code_Postal, LOCALITE=:Localite,');
      sql.add('DATE_1=:Date_1, MATRICULE=:Matricule, TELEPHONE=:Telephone, JUSTIFICATION=:Justification,');
      SQL.Add('ID_FONCTION_1=:Id_fonction_1, FONCTION_1=:Fonction_1, COURS_1=:Cours_1, NIVEAU_1=:Niveau_1,');
      SQL.Add('NATURE_COURS_11=:Nature_Cours_11, NATURE_COURS_22=:Nature_Cours_22, NATURE_COURS_33=:Nature_Cours_33, PERIODES_1=:Periodes_1,');
      sql.add('NIVEAU_11=:Niveau_11, ANNEE_ETUDE_1=:Annee_Etude_1, DATE_DEBUT_1=:Date_Debut_1, DATE_FIN_1=:Date_Fin_1,');
      SQL.Add('ID_FONCTION=:Id_Fonction, FONCTION=:Fonction, COURS=:Cours, NIVEAU=:Niveau,');
      SQL.Add('NATURE_COURS_1 = :Nature_Cours_1, NATURE_COURS_2=:Nature_Cours_2, NATURE_COURS_3=:Nature_Cours_3, PERIODES=:Periodes,');
      SQL.add('NIVEAU_2=:Niveau_2, ANNEE_ETUDE=:Annee_Etude, DATE_DEBUT=:Date_Debut, DATE_FIN=:Date_Fin');

      SQL.Add('Where NOM = :Oldtype and');
      SQL.Add('PRENOM = :Oldtype1 and');
      SQL.Add('ADRESSE = :Oldtype2 and');
      SQL.Add('CODE_POSTAL = :Oldtype3 and');
      SQL.Add('LOCALITE = :Oldtype4 and');
      SQL.Add('DATE_1 = :Oldtype5 and');
      SQL.Add('MATRICULE = :Oldtype6 and');
      SQL.Add('TELEPHONE = :Oldtype7 and');
      SQL.Add('JUSTIFICATION = :Oldtype8 and');
      SQL.Add('ID_FONCTION_1 = :Oldtype9 and');
      SQL.Add('FONCTION_1 = :Oldtype10 and');
      SQL.Add('COURS_1 = :Oldtype11 and');
      SQL.Add('NIVEAU_1 = :Oldtype12 and');
      SQL.Add('NATURE_COURS_11 = :Oldtype13 and');
      SQL.Add('NATURE_COURS_22 = :Oldtype14 and');
      SQL.Add('NATURE_COURS_33 = :Oldtype15 and');
      SQL.Add('PERIODES_1 = :Oldtype16 and');
      SQL.Add('NIVEAU_11 = :Oldtype17 and');
      SQL.Add('ANNEE_ETUDE_1 = :Oldtype18 and');
      SQL.Add('DATE_DEBUT_1 = :Oldtype19 and');
      SQL.Add('DATE_FIN_1 = :Oldtype20 and');
      SQL.Add('ID_FONCTION = :Oldtype21 and');
      SQL.Add('FONCTION = :Oldtype22 and');
      SQL.Add('COURS = :Oldtype23 and');
      SQL.Add('NIVEAU = :Oldtype24 and');
      SQL.Add('NATURE_COURS_1 = :Oldtype25 and');
      SQL.Add('NATURE_COURS_2 = :Oldtype26 and');
      SQL.Add('NATURE_COURS_3 = :Oldtype27 and');
      SQL.Add('PERIODES = :Oldtype28 and');
      SQL.Add('NIVEAU_2 = :Oldtype29 and');
      SQL.Add('ANNEE_ETUDE = :Oldtype30 and');
      SQL.Add('DATE_DEBUT = :Oldtype31 and');
      SQL.Add('DATE_FIN = :Oldtype32');

      DataModule5.ADOQuery2.Parameters.ParamByName('Nom').Value := edit20.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType').Value := OldType;
      DataModule5.ADOQuery2.Parameters.ParamByName('Prenom').Value := edit21.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType1').Value := OldType1;
      DataModule5.ADOQuery2.Parameters.ParamByName('Adresse').Value := edit22.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType2').Value := OldType2;
      DataModule5.ADOQuery2.Parameters.ParamByName('Code_Postal').Value := edit23.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType3').Value := OldType3;
      DataModule5.ADOQuery2.Parameters.ParamByName('Localite').Value := edit24.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType4').Value := OldType4;
      DataModule5.ADOQuery2.Parameters.ParamByName('Date_1').Value := edit25.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType5').Value := OldType5;
      DataModule5.ADOQuery2.Parameters.ParamByName('Matricule').Value := edit26.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType6').Value := OldType6;
      DataModule5.ADOQuery2.Parameters.ParamByName('Telephone').Value := edit27.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType7').Value := OldType7;
      DataModule5.ADOQuery2.Parameters.ParamByName('Justification').Value := edit19.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType8').Value := OldType8;
      DataModule5.ADOQuery2.Parameters.ParamByName('Id_Fonction_1').Value := edit1.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType9').Value := OldType9;
      DataModule5.ADOQuery2.Parameters.ParamByName('Fonction_1').Value := edit2.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType10').Value := OldType10;
      DataModule5.ADOQuery2.Parameters.ParamByName('Cours_1').Value := edit3.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType11').Value := OldType11;
      DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_1').Value := edit4.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType12').Value := OldType12;

      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_11').Value := edit5.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType13').Value := OldType13;
      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_22').Value := edit30.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType14').Value := OldType14;
      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_33').Value := edit31.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType15').Value := OldType15;
      DataModule5.ADOQuery2.Parameters.ParamByName('Periodes_1').Value := edit6.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType16').Value := OldType16;
      DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_11').Value := edit7.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType17').Value := OldType17;
      DataModule5.ADOQuery2.Parameters.ParamByName('Annee_Etude_1').Value := edit28.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType18').Value := OldType18;
      DataModule5.ADOQuery2.Parameters.ParamByName('Date_Debut_1').Value := edit8.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType19').Value := OldType19;
      DataModule5.ADOQuery2.Parameters.ParamByName('Date_Fin_1').Value := edit9.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType20').Value := OldType21;

      DataModule5.ADOQuery2.Parameters.ParamByName('Id_Fonction').Value := edit10.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType21').Value := OldType21;
      DataModule5.ADOQuery2.Parameters.ParamByName('Fonction').Value := edit11.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType22').Value := OldType22;
      DataModule5.ADOQuery2.Parameters.ParamByName('Cours').Value := edit12.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType23').Value := OldType23;
      DataModule5.ADOQuery2.Parameters.ParamByName('Niveau').Value := edit13.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType24').Value := OldType24;

      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_1').Value := edit14.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType25').Value := OldType25;
      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_2').Value := edit32.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType26').Value := OldType26;
      DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_3').Value := edit33.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType27').Value := OldType27;
      DataModule5.ADOQuery2.Parameters.ParamByName('Periodes').Value := edit15.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType28').Value := OldType28;
      DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_2').Value := edit16.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType29').Value := OldType29;
      DataModule5.ADOQuery2.Parameters.ParamByName('Annee_Etude').Value := edit29.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType30').Value := OldType30;
      DataModule5.ADOQuery2.Parameters.ParamByName('Date_Debut').Value := edit17.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType31').Value := OldType31;
      DataModule5.ADOQuery2.Parameters.ParamByName('Date_Fin').Value := edit18.text;
      DataModule5.ADOQuery2.Parameters.ParamByName('OldType32').Value := OldType32;
      ExecSQL;
      SQL.Clear;
      SQL.Add('SELECT * FROM DGT4_BIS ORDER BY NOM');
      Open;
      DGT4_BIS.BitBtn2.Click;
      DGT4_BIS.BitBtn4.Click;
      DGT4_BIS.BitBtn6.Click;
    end;
end;
<hr size="2" width="100%" />
Merci de votre aide.

1 réponse

Messages postés
28
Date d'inscription
mardi 14 octobre 2003
Statut
Membre
Dernière intervention
3 septembre 2006

J'ai essayé ca avec une autre form pour la modification. Cela
fonctionne modification, ok) mais lorsque j'ajoute deux enregistrements
avec deux memes nom et prenom, il change l'entiereté des champs ce qui
me donne deux enregistrements identique et des données qui sont perdu .

<!-- BEGIN TEMPLATE: bbcode_code -->

Code :

procedure TDGT4_bis.BitBtn10Click(Sender: TObject);
begin
DGT4_BIS.BitBtn7.Visible := true;
DGT4_BIS.BitBtn7.Enabled := true;
DGT4_BIS.BitBtn10.Visible := false;
DGT4_BIS.BitBtn10.Enabled := false;
with DataModule5.ADOQuery2 do
begin // Ici on modifie les champs sélectionner
SQL.Clear;
SQL.Add('Update DGT4_BIS set NOM=:Nom, PRENOM=:Prenom, ADRESSE=:Adresse, CODE_POSTAL=:Code_Postal, LOCALITE=:Localite,');
sql.add('DATE_1=:Date_1, MATRICULE=:Matricule, TELEPHONE=:Telephone, JUSTIFICATION=:Justification,');
SQL.Add('ID_FONCTION_1=:Id_fonction_1, FONCTION_1=:Fonction_1, COURS_1=:Cours_1, NIVEAU_1=:Niveau_1,');
SQL.Add('NATURE_COURS_11=:Nature_Cours_11, NATURE_COURS_22=:Nature_Cours_22, NATURE_COURS_33=:Nature_Cours_33, PERIODES_1=:Periodes_1,');
sql.add('NIVEAU_11=:Niveau_11, ANNEE_ETUDE_1=:Annee_Etude_1, DATE_DEBUT_1=:Date_Debut_1, DATE_FIN_1=:Date_Fin_1,');
SQL.Add('ID_FONCTION=:Id_Fonction, FONCTION=:Fonction, COURS=:Cours, NIVEAU=:Niveau,');
SQL.Add('NATURE_COURS_1 = :Nature_Cours_1, NATURE_COURS_2=:Nature_Cours_2, NATURE_COURS_3=:Nature_Cours_3, PERIODES=:Periodes,');
SQL.add('NIVEAU_2=:Niveau_2, ANNEE_ETUDE=:Annee_Etude, DATE_DEBUT=:Date_Debut, DATE_FIN=:Date_Fin');

SQL.Add('Where NOM = :Oldtype and');
SQL.Add('PRENOM = :Oldtype1 and');
SQL.Add('ADRESSE = :Oldtype2 and');
SQL.Add('CODE_POSTAL = :Oldtype3 and');
SQL.Add('LOCALITE = :Oldtype4 and');
SQL.Add('DATE_1 = :Oldtype5 and');
SQL.Add('MATRICULE = :Oldtype6 and');
SQL.Add('TELEPHONE = :Oldtype7 and');
SQL.Add('JUSTIFICATION = :Oldtype8 and');
SQL.Add('ID_FONCTION_1 = :Oldtype9 and');
SQL.Add('FONCTION_1 = :Oldtype10 and');
SQL.Add('COURS_1 = :Oldtype11 and');
SQL.Add('NIVEAU_1 = :Oldtype12 and');
SQL.Add('NATURE_COURS_11 = :Oldtype13 and');
SQL.Add('NATURE_COURS_22 = :Oldtype14 and');
SQL.Add('NATURE_COURS_33 = :Oldtype15 and');
SQL.Add('PERIODES_1 = :Oldtype16 and');
SQL.Add('NIVEAU_11 = :Oldtype17 and');
SQL.Add('ANNEE_ETUDE_1 = :Oldtype18 and');
SQL.Add('DATE_DEBUT_1 = :Oldtype19 and');
SQL.Add('DATE_FIN_1 = :Oldtype20 and');
SQL.Add('ID_FONCTION = :Oldtype21 and');
SQL.Add('FONCTION = :Oldtype22 and');
SQL.Add('COURS = :Oldtype23 and');
SQL.Add('NIVEAU = :Oldtype24 and');
SQL.Add('NATURE_COURS_1 = :Oldtype25 and');
SQL.Add('NATURE_COURS_2 = :Oldtype26 and');
SQL.Add('NATURE_COURS_3 = :Oldtype27 and');
SQL.Add('PERIODES = :Oldtype28 and');
SQL.Add('NIVEAU_2 = :Oldtype29 and');
SQL.Add('ANNEE_ETUDE = :Oldtype30 and');
SQL.Add('DATE_DEBUT = :Oldtype31 and');
SQL.Add('DATE_FIN = :Oldtype32');

DataModule5.ADOQuery2.Parameters.ParamByName('Nom').Value := edit20.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType').Value := OldType;
DataModule5.ADOQuery2.Parameters.ParamByName('Prenom').Value := edit21.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType1').Value := OldType1;
DataModule5.ADOQuery2.Parameters.ParamByName('Adresse').Value := edit22.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType2').Value := OldType2;
DataModule5.ADOQuery2.Parameters.ParamByName('Code_Postal').Value := edit23.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType3').Value := OldType3;
DataModule5.ADOQuery2.Parameters.ParamByName('Localite').Value := edit24.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType4').Value := OldType4;
DataModule5.ADOQuery2.Parameters.ParamByName('Date_1').Value := edit25.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType5').Value := OldType5;
DataModule5.ADOQuery2.Parameters.ParamByName('Matricule').Value := edit26.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType6').Value := OldType6;
DataModule5.ADOQuery2.Parameters.ParamByName('Telephone').Value := edit27.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType7').Value := OldType7;
DataModule5.ADOQuery2.Parameters.ParamByName('Justification').Value := edit19.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType8').Value := OldType8;
DataModule5.ADOQuery2.Parameters.ParamByName('Id_Fonction_1').Value := edit1.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType9').Value := OldType9;
DataModule5.ADOQuery2.Parameters.ParamByName('Fonction_1').Value := edit2.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType10').Value := OldType10;
DataModule5.ADOQuery2.Parameters.ParamByName('Cours_1').Value := edit3.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType11').Value := OldType11;
DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_1').Value := edit4.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType12').Value := OldType12;

DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_11').Value := edit5.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType13').Value := OldType13;
DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_22').Value := edit30.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType14').Value := OldType14;
DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_33').Value := edit31.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType15').Value := OldType15;
DataModule5.ADOQuery2.Parameters.ParamByName('Periodes_1').Value := edit6.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType16').Value := OldType16;
DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_11').Value := edit7.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType17').Value := OldType17;
DataModule5.ADOQuery2.Parameters.ParamByName('Annee_Etude_1').Value := edit28.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType18').Value := OldType18;
DataModule5.ADOQuery2.Parameters.ParamByName('Date_Debut_1').Value := edit8.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType19').Value := OldType19;
DataModule5.ADOQuery2.Parameters.ParamByName('Date_Fin_1').Value := edit9.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType20').Value := OldType21;

DataModule5.ADOQuery2.Parameters.ParamByName('Id_Fonction').Value := edit10.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType21').Value := OldType21;
DataModule5.ADOQuery2.Parameters.ParamByName('Fonction').Value := edit11.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType22').Value := OldType22;
DataModule5.ADOQuery2.Parameters.ParamByName('Cours').Value := edit12.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType23').Value := OldType23;
DataModule5.ADOQuery2.Parameters.ParamByName('Niveau').Value := edit13.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType24').Value := OldType24;

DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_1').Value := edit14.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType25').Value := OldType25;
DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_2').Value := edit32.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType26').Value := OldType26;
DataModule5.ADOQuery2.Parameters.ParamByName('Nature_Cours_3').Value := edit33.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType27').Value := OldType27;
DataModule5.ADOQuery2.Parameters.ParamByName('Periodes').Value := edit15.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType28').Value := OldType28;
DataModule5.ADOQuery2.Parameters.ParamByName('Niveau_2').Value := edit16.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType29').Value := OldType29;
DataModule5.ADOQuery2.Parameters.ParamByName('Annee_Etude').Value := edit29.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType30').Value := OldType30;
DataModule5.ADOQuery2.Parameters.ParamByName('Date_Debut').Value := edit17.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType31').Value := OldType31;
DataModule5.ADOQuery2.Parameters.ParamByName('Date_Fin').Value := edit18.text;
DataModule5.ADOQuery2.Parameters.ParamByName('OldType32').Value := OldType32;
ExecSQL;
ShowMessage('Enreg. affectés: ' + IntToStr(RowsAffected));
SQL.Clear;
SQL.Add('SELECT * FROM DGT4_BIS ORDER BY NOM');
Open;
DGT4_BIS.BitBtn2.Click;
DGT4_BIS.BitBtn4.Click;
DGT4_BIS.BitBtn6.Click;
end;
end;