1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| QUAND EXCEPTION DANS
// actualisation de la table principale
AN_Etude.ETU_Libelle = ed_NomEtude
AN_Etude.ETU_Alias = ed_Alias
AN_Etude.ETU_Excel = ed_Alias
AN_Etude.ETU_ParentID = ed_ETUID
SI Val(ed_ID) = 0 ALORS
SI HAjoute(AN_Etude) =Faux ALORS LB_OK = Faux
ed_ID = AN_Etude.ETU_ID
SINON
SI HModifie(AN_Etude) =Faux ALORS LB_OK = Faux
FIN
LC_SQL = "Insert into AN_EtudeDetails "
LC_SQL += "(DET_Type, ETU_ID, DET_Gauche, DET_Hauteur)"
LC_SQL += "values ("
LC_SQL += TOOLS_EncodeSQL({LC_NomChamp + ".ed_DetailType"}, "C") + ", "
LC_SQL += TOOLS_EncodeSQL(ed_ID, "N") + ", "
LC_SQL += TOOLS_EncodeSQL({LC_NomChamp + ".ed_Gauche"}, "N") + ", "
LC_SQL += TOOLS_EncodeSQL({LC_NomChamp + ".ed_Hauteur"}, "N") + ")"
GO_IAD.IAD_ExecuteRequete(LC_SQL)
// mode transactionnel
HTransactionFin(GO_IAD.LO_IAD_Connexion)
Info("Les informations ont bien été enregistrées")
RENVOYER Vrai
FAIRE
HTransactionAnnule(GO_IAD.LO_IAD_Connexion)
Info("Des erreurs ont été rencontrées. Les informations n'ont pas été enregistrées",
"Erreur base : " + HErreurInfo,
"Autre " + ErreurInfo)
RENVOYER Faux
FIN |
Partager