Hi all,
I'm pretty sure the way I'm doing things is NOT the most efficient method...
As I've posted in the past, this is my situation:
I have a folder, where autogenerated text files are placed throughout the day (no set number).
I have my database going in to the folder, opening up the text files, and transferring all the data to Access tables.
The files are named "AL001234.hst" where 001234 is a number that increases by 1 every time a new file is created.
Now I have it working, but I know there has to be a better way.
One problem I've found is that occasionally there are missing numbers, ie it will jump from "AL005501" to "AL 005510". The method I was originally using was saving the number section of each file name in a table, and checking the last number, adding one, and opening up the next one. This obviously doesn't work when there are gaps.
Another problem I have is...the same data stays in the folder for a couple months, and I don't want the same files to be pulled in more than once.
Does anyone have a suggestion of how I could be doing this better. I can think of a few ways to do it...but they would take a LONG time to run through.
Thanks!!
amber
I'm pretty sure the way I'm doing things is NOT the most efficient method...
As I've posted in the past, this is my situation:
I have a folder, where autogenerated text files are placed throughout the day (no set number).
I have my database going in to the folder, opening up the text files, and transferring all the data to Access tables.
The files are named "AL001234.hst" where 001234 is a number that increases by 1 every time a new file is created.
Now I have it working, but I know there has to be a better way.
One problem I've found is that occasionally there are missing numbers, ie it will jump from "AL005501" to "AL 005510". The method I was originally using was saving the number section of each file name in a table, and checking the last number, adding one, and opening up the next one. This obviously doesn't work when there are gaps.
Another problem I have is...the same data stays in the folder for a couple months, and I don't want the same files to be pulled in more than once.
Does anyone have a suggestion of how I could be doing this better. I can think of a few ways to do it...but they would take a LONG time to run through.
Thanks!!
amber