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 32 33 34
| Fice = fichier
Open Fice For Input As #1
' Ouverture de la table
Set rc = dbase.OpenRecordset("client1") ', dbaseopentable)
td = 0
Do While Not EOF(1)
Line Input #1, LignE
TableW() = Split(LignE, "|")
rc.AddNew
On Error Resume Next
dbase.Execute " BeginTrans "
For i = 0 To UBound(TableW)
rc.Fields(i).Value = TableW(i) ' Création d'une ligne
td = i + 1
If td Mod 200 = 0 Then
dbase.Execute " CommiTrans"
End If
Next i
rc.Update
Loop
MsgBox (" remplissage de la table terminée!"), vbExclamation, "Fin de l'importation"
Close #1
rc.Close
Set rc = Nothing
dbase.Close
End Sub |
Partager