1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
// Déclaration des variables
//-- On ouvre le fichier
// Indication du chemin d'ouverture d'un fichier externe
IdFichier = fOuvre("C:\WD_DATA\Surveillance_Zones.csv",foLectureEcriture)
SI IdFichier <> -1 ALORS
// Lecture d'une ligne dans ce fichier
Reslecture = fLitLigne(IdFichier)
TANTQUE Reslecture <> EOT ET Reslecture <> ""
//-- On insert les données dans la table pour affichage et création de l'état
Trace("INSERT INTO Surveillance_Zones (NOM,HORODATAGE,SERVICE,LIEU_RASSEMBLEMENT) VALUES ('"+ExtraitChaîne(Reslecture,1,";")+"','"+ExtraitChaîne(Reslecture,2,";")+"','"+ExtraitChaîne(Reslecture,3,";")+"','"+ExtraitChaîne(Reslecture,4,";")+"') ")
SI PAS HExécuteRequêteSQL(Requete1, hRequêteSansCorrectionHF,...
"INSERT INTO Surveillance_Zones (NOM,HORODATAGE,SERVICE,LIEU_RASSEMBLEMENT) VALUES ('"+ExtraitChaîne(Reslecture,1,";")+"','"+ExtraitChaîne(Reslecture,2,";")+"','"+ExtraitChaîne(Reslecture,3,";")+"','"+ExtraitChaîne(Reslecture,4,";")+"') ") ALORS
Erreur(HErreurInfo(hErrComplet))
SINON
Reslecture = fLitLigne(IdFichier)
FIN
FIN
FIN |
Partager