download file to specific location through vb6
hi everyone,
I have a database mdb file in my project, which is likely to be update from time to time.
I want to put a Update Command in my vb project to download the database file at specific location e.g. c:\programfiles\mysoftware and to replace the older file without asking the user, it may also add that vb compare both the files that whether the size of files is different, if file size is different then download, if same size then give msg that no update is available for now.
Is it possible ????? if so plz help
Re: download file to specific location through vb6
There are plenty of examples on this forum regarding downloading a file from the internet and/or ftp.
Regarding file size, I wouldn't suggest to base it off of that. If one mdb is compacted and the other isn't, then different file sizes though may be the same file. You may want to store a text file on your server that contains some version number. Get that and compare it to a version you have in one of the tables of the mdb file on user's system. If different then update else don't
Re: download file to specific location through vb6
Also you should avoid putting something like an MDB file under the Program Files folder. This is what the various AppData (common, per-user, local vs. roaming) folders are for.
1 Attachment(s)
Re: download file to specific location through vb6
Quote:
Originally Posted by
LaVolpe
There are plenty of examples on this forum regarding downloading a file from the internet and/or ftp.
Regarding file size, I wouldn't suggest to base it off of that. If one mdb is compacted and the other isn't, then different file sizes though may be the same file. You may want to store a text file on your server that contains some version number. Get that and compare it to a version you have in one of the tables of the mdb file on user's system. If different then update else don't
i follow u and find some examples in code bank and planet-source code, out of them i found the attached file nearest to my expectations, it looks for verson on net via txt file and then download the updates. But I could not understand in this project where to change the location of my mdb file, and how to automate the save location, means do not ask for location to save and autometically repalce the older file. Plz check the project and guide me on the way.
Regards. :wave:
Re: download file to specific location through vb6
The frmSave form is where the filename & path are set. The public variable is in the module and is named: FilePathName
Regarding post #3, wherever you decide to download your mdb to, ensure FilePathName contains the path & mdb file name. Though you probably want to download it to a backup file, ensure download was successful, then delete the old mdb & rename the backup to the original mdb name
Re: download file to specific location through vb6
i could not get proper way.
Suppose I have mdb file installed in C:\Program Files\Common Files\xxx\abc.mdb, I uploaded same file on my server alongwtih text file containing the version 2.0. The link to these files is www.myhosting/files/abc.mdb and www.myhosting/files/version.txt (for eg only)
Now turns to attached project. This project download Update.exe, but there is only link to set txt file of version or news.txt, but there is no link to change update.exe to change with abc.mdb. Where do i set filename from Update.exe to abc.mdb ???