473,785 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pls help me for the VB Inet Controls use to download file from site

4 New Member
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.GetH eader("Content-Length"))"

Please give me the Soluion for this ASAP




Function DownloadZipandU nzip(ByVal File As String, row As Integer, col As Integer, Value As String, dBase As String) As Boolean


Dim Size As Long, Remaining As Long, FFile As Integer, Chunk() As Byte
Dim loginString As String

Inet1.Execute "http://www.eximalert.c om/Test/" & File, "GET" ------->error has occured here


Do While Inet1.StillExec uting
DoEvents
Loop

Size = CLng(Inet1.GetH eader("Content-Length"))
Remaining = Size


FFile = FreeFile
Open App.Path & "\" & File For Binary Access Write As #FFile
Do Until Remaining = 0
Form1.Height = 2955
ProgressBar1.Vi sible = True
If Remaining > 1024 Then
Chunk = Inet1.GetChunk( 1024, icByteArray)
Remaining = Remaining - 1024
If ProgressBar1.Va lue < 100 Then
ProgressBar1.Va lue = ProgressBar1.Va lue + 1
End If
Else
Chunk = Inet1.GetChunk( Remaining, icByteArray)
Remaining = 0
End If
Aug 3 '07 #1
0 1173

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6081
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
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
4964
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"
4
8376
by: Steen Gellett | last post by:
Hallo.....I have programmed with winsock for a while, but now I have set my eyes on Inet, but I'm totally blank........a few questions ?? Inet1.Protocol = icFTP......................I can see what this is Inet1.RemotePort = Text4.Text......... Whats the use ?? Inet1.URL = Text1.Text....................Can this be an IP adresse Inet1.UserName = Text2.Text........... I guess thats to connect to FTP Inet1.Password = Text3.Text............ I...
4
13892
by: S.W. Rasmussen | last post by:
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_StateChanged(ByVal State ByVal Integer)
5
1896
by: John A Grandy | last post by:
is it possible to write a vb.net code (intended to run on the client-side) that would invoke an instance of IE, have it download a page from a certain URL, and then pre-populate some of the controls on that page, before transferring focus to the browser-page and showing it to the user? (the user would be responsible for submitting the page.)
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
1009
by: mohamed82 | last post by:
i have an Runtime error for occuring at the time of downloading from the site the error will cause " Unable to complete your request" when i was running the application.here mainly downloading files more then 500MB from the site.. This my coding function start here--------------*----------------- Dim Size As Long, Remaining As Long, FFile As Integer, Chunk() As Byte Dim loginString As String ' Dim Max As Long ...
0
2571
by: leoce7 | last post by:
I'm trying to write a macro in excel 2003 to use the "Microsoft Internet Control' reference library to access data from a web page. The problem is that it won't let me dimensionalize Inet controls even though I have added the reference ... i.e "Dim inet1 as Inet" is not allowed. Does anybody have any experience with Inet controls through excel?
0
9645
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
10155
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...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8978
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...
0
6741
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
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.