473,770 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to use inet.execute to download a file

I have tried several times to get inet.execute to download a file with the
icHTTP protocol without much success so far.

I execute:

Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"

monitor the progress in

Inet_StateChang ed(ByVal State ByVal Integer)

looking for State = icResponseCompl eted

I consistantly get State = 9 - and no downloaded file

Does anyone have a bit of code/advice to get this to work. I am currently
using the Inet.OpenURL method
which works fine but does not allow you to display download progress.

Soeren
Jul 17 '05 #1
4 13890
How about using IE's built in method including the Save As and progress
dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm (this
works for http as well as ftp files). The code includes a means to set the
Save As path to a location of your choice, then restore the user's default
Save As path for subsequent use with IE. This way the user's settings are
not adversely affected by the code, and his next download using IE will
offer to save to the location he is accustomed to.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
news:40******** *************@d read12.news.tel e.dk...
: I have tried several times to get inet.execute to download a file with the
: icHTTP protocol without much success so far.
:
: I execute:
:
: Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
:
: monitor the progress in
:
: Inet_StateChang ed(ByVal State ByVal Integer)
:
: looking for State = icResponseCompl eted
:
: I consistantly get State = 9 - and no downloaded file
:
: Does anyone have a bit of code/advice to get this to work. I am currently
: using the Inet.OpenURL method
: which works fine but does not allow you to display download progress.
:
: Soeren
:
:

Jul 17 '05 #2
Thanks a lot Randy, I'll try this solution. There may, however, be a
copyright problem as the code is to be included in a distributed application
(software package for analysis of nucleotide and protein sequences,
www.seqtools.dk) which seems to be in conflict with the copyright notice of
the code.

Cheers Soeren

"Randy Birch" <rg************ @mvps.org> wrote in message
news:ff******** **********@news 04.bloor.is.net .cable.rogers.c om...
How about using IE's built in method including the Save As and progress
dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm (this works for http as well as ftp files). The code includes a means to set the Save As path to a location of your choice, then restore the user's default
Save As path for subsequent use with IE. This way the user's settings are
not adversely affected by the code, and his next download using IE will
offer to save to the location he is accustomed to.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
news:40******** *************@d read12.news.tel e.dk...
: I have tried several times to get inet.execute to download a file with the : icHTTP protocol without much success so far.
:
: I execute:
:
: Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
:
: monitor the progress in
:
: Inet_StateChang ed(ByVal State ByVal Integer)
:
: looking for State = icResponseCompl eted
:
: I consistantly get State = 9 - and no downloaded file
:
: Does anyone have a bit of code/advice to get this to work. I am currently : using the Inet.OpenURL method
: which works fine but does not allow you to display download progress.
:
: Soeren
:
:

Jul 17 '05 #3
Oh no .. you can use it as you see fit. The notice is only for leverage for
those few instances where I have to chase down people who have reproduced
the site as their own. Having the notice posted makes the ISPs really sit up
and take notice. Other than one korean site, I've had perfect success with
this. And I've fixed the korean site so visitors there know the story. <g>

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
news:40******** *************@d read14.news.tel e.dk...
: Thanks a lot Randy, I'll try this solution. There may, however, be a
: copyright problem as the code is to be included in a distributed
application
: (software package for analysis of nucleotide and protein sequences,
: www.seqtools.dk) which seems to be in conflict with the copyright notice
of
: the code.
:
: Cheers Soeren
:
: "Randy Birch" <rg************ @mvps.org> wrote in message
: news:ff******** **********@news 04.bloor.is.net .cable.rogers.c om...
: > How about using IE's built in method including the Save As and progress
: > dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm
: (this
: > works for http as well as ftp files). The code includes a means to set
: the
: > Save As path to a location of your choice, then restore the user's
default
: > Save As path for subsequent use with IE. This way the user's settings
are
: > not adversely affected by the code, and his next download using IE will
: > offer to save to the location he is accustomed to.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
: > news:40******** *************@d read12.news.tel e.dk...
: > : I have tried several times to get inet.execute to download a file with
: the
: > : icHTTP protocol without much success so far.
: > :
: > : I execute:
: > :
: > : Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
: > :
: > : monitor the progress in
: > :
: > : Inet_StateChang ed(ByVal State ByVal Integer)
: > :
: > : looking for State = icResponseCompl eted
: > :
: > : I consistantly get State = 9 - and no downloaded file
: > :
: > : Does anyone have a bit of code/advice to get this to work. I am
: currently
: > : using the Inet.OpenURL method
: > : which works fine but does not allow you to display download progress.
: > :
: > : Soeren
: > :
: > :
: >
:
:

Jul 17 '05 #4
I just implemented the IE based download feature - its fairly simple, and
not least works perfectly. Thanks a lot...

Cheers, Soeren
"Randy Birch" <rg************ @mvps.org> wrote in message
news:NZ******** ************@ne ws01.bloor.is.n et.cable.rogers .com...
Oh no .. you can use it as you see fit. The notice is only for leverage for those few instances where I have to chase down people who have reproduced
the site as their own. Having the notice posted makes the ISPs really sit up and take notice. Other than one korean site, I've had perfect success with
this. And I've fixed the korean site so visitors there know the story. <g>

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
news:40******** *************@d read14.news.tel e.dk...
: Thanks a lot Randy, I'll try this solution. There may, however, be a
: copyright problem as the code is to be included in a distributed
application
: (software package for analysis of nucleotide and protein sequences,
: www.seqtools.dk) which seems to be in conflict with the copyright notice
of
: the code.
:
: Cheers Soeren
:
: "Randy Birch" <rg************ @mvps.org> wrote in message
: news:ff******** **********@news 04.bloor.is.net .cable.rogers.c om...
: > How about using IE's built in method including the Save As and progress : > dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm
: (this
: > works for http as well as ftp files). The code includes a means to set : the
: > Save As path to a location of your choice, then restore the user's
default
: > Save As path for subsequent use with IE. This way the user's settings
are
: > not adversely affected by the code, and his next download using IE will : > offer to save to the location he is accustomed to.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "S.W. Rasmussen" <sw*@seqtools.d k> wrote in message
: > news:40******** *************@d read12.news.tel e.dk...
: > : I have tried several times to get inet.execute to download a file with : the
: > : icHTTP protocol without much success so far.
: > :
: > : I execute:
: > :
: > : Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
: > :
: > : monitor the progress in
: > :
: > : Inet_StateChang ed(ByVal State ByVal Integer)
: > :
: > : looking for State = icResponseCompl eted
: > :
: > : I consistantly get State = 9 - and no downloaded file
: > :
: > : Does anyone have a bit of code/advice to get this to work. I am
: currently
: > : using the Inet.OpenURL method
: > : which works fine but does not allow you to display download progress. : > :
: > : Soeren
: > :
: > :
: >
:
:

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6079
by: Laphan | last post by:
Hi All Just wanted to know if anybody knows the answer to the following quick queries: 1) The reason I'm using VB's INET control is to download copies of Ms Access DBs on a range of web sites so that I have a backup. Found out from my ISP that if my DBs go up the spout then it's down to me to restore - gulp!!! I've created a little FTP gizmo where I could download web pages OK, but not
0
1947
by: Laphan | last post by:
I know this is a crosspost, but I need to know which is the best one for posting INET FTP queries, so that I'm not cross-posting in future. Now that I've posted could somebody let me know: 1) Why can I download Access DBs from FTP sites in the default mode (icString??) and everything looks OK (eg, file/byte size, functionality, etc), when MSDN shows a completely different method for binary downloads? I thought Access DBs were binary...
2
13155
by: Kapish Kalda | last post by:
Hi, I am using Inet AcitveX to download a file form Http.(code below) but couldnot able to download. The file size is about 2MB. Please Suggest. Thanks Code Private Sub Command1_Click()
0
4963
by: dartszeeland.tk | last post by:
Hi, i want to upload a file from my computer to a ftp..... this is the code: Inet.RemoteHost = "localhost" '(not ftp:// in front of it) Inet.RemotePort = "21" Inet.UserName = "user" Inet.Password = "password"
0
1244
by: Tom Libby | last post by:
I have a control that is based on the Inet control it has a httppost method which is below. During development everything works fine but after I build an exe the StillExecting property is not being reset to .F. and the exe is using 95% of my processor. The "After THIS.StillExecuting " test is not being written out to the file. I use this same control on other forms with no problem in development or in an exe.
3
1705
by: danny relic | last post by:
Is it possible for inet to access a webpage, fill out post data, and then do another action afterwards? How would I do that? For instance, I've got inet accessing a site where it needs to do a POST action, then I want to have it go to a specified URL in text1.text How can I do this? Here's my code as of now:
1
3346
by: pbak | last post by:
Hai! I am working with INET Control in Vb(Internet transfer Control) Actual Domain Recieving Data from Weighing Scale I connected Weighing Scale to PC using Cross network cable using network port by specifying IpAddress in Scale When I am Pinging scale through using "Ping scale IP" Reply is coming from scale properly where as scale is using FTP Protocol the followwing Coding used to get a...
0
1060
by: mohamed82 | last post by:
Hi all,i m trying to download zip file from the site.following coding to use download at the time runtime error will cause "Unable to Complete Your Request" after clik the debug window error will appper on the "Size = CLng(Inet1.GetHeader("Content-Length"))" Please give me the Soluion for this ASAP Function DownloadZipandUnzip(ByVal File As String, row As Integer, col As Integer, Value As String, dBase As String) As Boolean
0
1173
by: mohamed82 | last post by:
Hi all,i m trying to download zip file from the site.following coding to use download at the time runtime error will cause "Unable to Complete Your Request" after clik the debug window error will appper on the "Size = CLng(Inet1.GetHeader("Content-Length"))" Please give me the Soluion for this ASAP Function DownloadZipandUnzip(ByVal File As String, row As Integer, col As Integer, Value As String, dBase As String) As Boolean
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.