Solved

Internet Download

Posted on 2001-06-13
4
173 Views
Last Modified: 2013-11-14
How do I download a file and place it in a specific folder without user intervention?  For example, I have a file http://www.mydomain.com/interestrates.mdb that I need to download to the application path.
0
Comment
Question by:northeyk
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 100 total points
ID: 6187037
Add internet transfer control to your project.

Private Sub Command1_Click()
    Dim bytFile() As Byte
    bytFile = Inet1.OpenURL("http://www.mydomain.com/interestrates.mdb", icByteArray)
    Open App.Path & "\interestrates.mdb" For Binary As #1
    Put #1, , bytFile
    Close #1
End Sub
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6187077
I would wrap the MDB into a self extracting EXE.  Within WINZIP's Self Extractor you can specify whether you want to run the extractor automatically, also where you want the file to be extracted to.  IMHO this would be the best way.

Cheers
0
 

Author Comment

by:northeyk
ID: 6187475
Works great.  Thanks.

Dave.

I can't use a self-extracting zip file because I don't know the application path.  I use InstallShield and the user can change the destination folder.  Thanks anyway.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6187614
You're welcome.  Happy to help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now