Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically download updated file used by VB program

Status
Not open for further replies.

VBill57

Programmer
Oct 12, 2004
12
US
Hi,

I've written a VB app that uses data from an Access database that is in the same folder as the EXE. Currently I instruct users to manually download an updated .mdb file periodically from my website, using a browser. (The data is updated a couple of times per week)

What I'd like to know is, can VB be used to check the timestamp of the database file on the website, and compare it to the database file currently on the users PC, and do an automatic update if necessary? I've used the Inet control, and have been able to download the file from the ftp site. Do you need VBScript to get the file's timestamp?

Something similar to the way an anti-virus update is done, with a popup notification, and "Click Here to download" would be ideal. I'm sure I can figure out how to determine if an internet connection exists. Automatic notification about an updated file would require a small app constantly running in the background, and I'm not sure if I want to do that. Maybe I should just allow the user to manually start the download from within the app. Any suggestions would be great.

Thanks a lot.
 
I guess I'll forget about the "automatic" download part. I'll just allow the user to download the file from within the VB program.

One quick question - how can you get the DateLastModified or DateLastAccessed property of a file that is available for download? (It's on my ftp site) Can this be returned using FSO and VB, or do you need to use VBScript?

Thanks for any help.
 
You should be able to get it with FSO.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top