Can someone please point me to an example where using VBA, a comma delimited txt file is imported into a table? I can't use a 'canned' routine becasue I need to be able to examine each record before it is imported.
Thanks.
Thanks.
Exactly what makes sense about importing garbage and then getting rid of the garbage?
Importing by VBA is going to be perilous if you have a shaky network...
Sorry, our network goes out if it rains (wish I was kidding), so I'm paranoid.My system has done this several times a day for several years. It has imported text files with many thousands of lines using FileSystemObject.OpenTextFile and never once glitched.
In "real" staging tables you just have one table "tblSomenameStaging", you would import the text file to that table which then preferably is stored in a backend DB so you can compact the BE on demand.
You NEVER make a temporary table, always have a perminant table that acts as your staging table.... By using a temporary table you lose the control you so despirately want/need.
Another "way" is to use a linked CSV, and you move the files in and out of "use" on the filesystem... Though I dont like that solution personaly since I believe you should "mess" with source files as little as possible.
The "standard" way of keeping track of process files is to have a table with only ID, Filename, Processdate in it.