Results 1 to 6 of 6

Thread: download file to specific location through vb6

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2009
    Location
    India
    Posts
    158

    Question 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

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2009
    Location
    India
    Posts
    158

    Question Re: download file to specific location through vb6

    Quote Originally Posted by LaVolpe View Post
    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.
    Attached Files Attached Files

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Dec 2009
    Location
    India
    Posts
    158

    Question 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 ???

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width