Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Download Files


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-18-2008, 01:47 PM
Junior Member
 
Join Date: Mar 2008
Posts: 41
Default Download Files

Hello Erel,
Hello to everyone,
Doing this routine for the download:

Sub DownloadFile (LocalFile)
Response.New1
Request.New1(URL)
Request.TimeOut = 30000
Response.Value = Request.GetResponse
Reader.New1(Response.GetStream,true)
FileOpen(c1,LocalFile,cRandom)
Writer.New1(c1,false)
count = Reader.ReadBytes(buffer(),4096)
Do While count > 0
Writer.WriteBytes2(buffer(),0,count)
count = Reader.ReadBytes(buffer(),4096)
Loop
FileClose(c1)
Response.Close
End Sub


In the case in which the URL is momentarily unreachable, the running of the programme is interrupted and an error message appears. Is it possible instead that a string could be generated ( to be used later in an eventual downloads report) without the programme being interrupted?
Thankyou in advance for your replies
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 01:54 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

You can use ErrorLabel to catch the error and do what ever you need.
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 01:57 PM
Junior Member
 
Join Date: Mar 2008
Posts: 41
Default

Many thanks for your reply, Erel.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with download file Byak@ Questions & Help Needed 2 07-14-2008 07:14 PM
Why can't I Download all the examples? Jonathon Questions & Help Needed 4 06-24-2008 05:18 PM
Download files Raytracer Italian Forum 4 04-13-2008 11:01 PM
Can I upload and download files from device to PC superbabicka Questions & Help Needed 2 03-31-2008 03:47 PM
Progress bar on FTP download willisgt Questions & Help Needed 16 01-28-2008 05:22 PM


All times are GMT. The time now is 02:31 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0