Naming convention for updates

  • Thread starter rdemyan via AccessMonster.com
  • Start date
R

rdemyan via AccessMonster.com

I want to be able to have my application download files from my ftp site for
updating of tables. What I would like to do is to have my app check for
updates on startup. If it finds one then it notifies the user who can click
on 'Yes' to update at that time or 'No' to update at some other time.

I have all the code working to connect to my ftp site and get the names of
any files.

But I'm wondering how to name my files. Let me give you an example.

The table that needs to be updated in my application (actually located in the
backend) is a weather data table. So there would be monthly updates required
to this table. Should I only post an update that appends the new month's
worth of data to the table. Or should I have my update contain an entire
calendar year's worth of data and overwrite any existing data for the year in
the table and add the new data as well. I think the advantage of doing it
this way is that the user can download an entire year's worth of data if
needed.

So if we keep the data by year then the ftp site would contain files such as
the following

WeatherData-2004.xls
WeatherData-2005.xls
WeatherData-2006-06.xls

The WeatherData-2006-06.xls would indicate that the data for FY'06 is only
current through June (month 6 in the calendar year). The other two files
would contain complete data.

Now when the code checks for an update, it would go to a table to look for
the last update that was downloaded (i.e. WeatherData-2006-05.xls). How would
I best determine that WeatherData-2006-06 is greater and should be downloaded.
I don't want the code to get confused and tell the user that WeatherData-2004.
xls and WeatherData-2005.xls need to be downloaded.

Or maybe I should just post a .mdb instead of .xls. But I'm still unclear
about naming conventions so that my code can understand that a particular
file is indeed an update.

Thoughts, suggestions, advice are greatly appreciated.
 
S

Steve Schapel

Rdemyan,

To be honest, I don't really think the naming convention that you use
for your external files is as important as getting the business process
clear. You are importing data from an external data source into your
Access tables. How do you, or your Access application, know that there
is a file for downloading/importing? Once that file has been imported,
will the Access application ever need to know about it again? What
happens if the data in the external data file is changed after you have
imported it into your Access database? Etc. Of course, I don't know
the answer to these questions. But here are a couple of possibilities,
that may or may not fit...
- as part of your download/import procedure, delete or rename or move
the remote file, so that it is no longer recognised by your Access
application, then you don't need to worry about it.
- as part of your download/import procedure, write the name of the
file into a table in your database, and then your application will know
not to use that file again, regadless of its name, in other words it
will only process files that are not recorded as having already been
processed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top