1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| execute ibeblock
returns (Resultat varchar(50))
as
begin
i = 0;
FS = ibec_fs_OpenFile('C:\Partage\curage_chlef.csv', __fmOpenRead);
if (not FS is null) then
begin
while (not ibec_fs_Eof(FS)) do
begin
s = ibec_fs_Readln(FS);
ValCount = ibec_ParseCSVLine(Vals, s, '', ';', __csvEmptyStringAsNull);
INSERT INTO tb_curage (code_commune, date_curage, nombre_reclamation, nombre_intervention,
lineaire_cure, regard_cure, volume_collecte, dechet_evacue,
pose_conduites, regard_realise, nbr_branchemen_realise, avaloir_cure) VALUES :Vals;
i = i + 1;
commit;
end
ibec_fs_CloseFile(FS);
end
Resultat = i || 'Ligne(s) inséré(s) dans la table tb_curage';
suspend;
end |
Partager