Granty
10-18-2004, 10:23 AM
Hi all,
I have written a sub to import about 25000 files into access. Most are only 1 record. Basically it loops through the directory, checks if the file has been imported already (via SQL query to my import auditlog), imports it and writes to the Auditlog.
No problems so far. However, when checking the data, it appears that some files have not actually been imported, despite the auditlog telling me they have. Im guessing Access is losing the plot somewhere with its memory etc (sometimes it flips completely and tells me it cant find the import spec despite having used it 9000 times already) and not actually writing the data to the table sometimes.
So....
1) Anybody had this problem before and worked out a solution?
2) If not, do you think DoEvents after the TransferText line will make a difference?
Im going to plump for the DoEvents if noone has any better suggestions, but this thing takes ages to run and I'd rather not waste my time if at all possible.
Cheers
J.
I have written a sub to import about 25000 files into access. Most are only 1 record. Basically it loops through the directory, checks if the file has been imported already (via SQL query to my import auditlog), imports it and writes to the Auditlog.
No problems so far. However, when checking the data, it appears that some files have not actually been imported, despite the auditlog telling me they have. Im guessing Access is losing the plot somewhere with its memory etc (sometimes it flips completely and tells me it cant find the import spec despite having used it 9000 times already) and not actually writing the data to the table sometimes.
So....
1) Anybody had this problem before and worked out a solution?
2) If not, do you think DoEvents after the TransferText line will make a difference?
Im going to plump for the DoEvents if noone has any better suggestions, but this thing takes ages to run and I'd rather not waste my time if at all possible.
Cheers
J.