Solved

FTP error from VB using WinInet API

Posted on 2002-07-03
3
989 Views
Last Modified: 2012-06-27
Hello,

Tech: VB, IIS, WinInet API

I am implemeting FTP Asynchronously using WinInet dll. But sometimes I am receiving a error either sending files or retriving files.

The error number is 12031 (retrieved from Err.LastDLLError) and the Error documentation in the microsoft site says "The connection with the server has been reset".

Can you pls. tell me what does that error means? Is there a way to fix the above error?

Thanks.
0
Comment
Question by:soni1978
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 200 total points
ID: 7127460
Did you see these articles:

INFO: Using WinInet APIs Asynchronously Within Visual Basic (Q189850)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q189850

Also:
Win32 Internet HTTP Functions in Visual Basic
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebtool/html/msdn_vbhttp.asp

and I quote:
<quote>
The WinInet API also provides FTP and Gopher functions; however, the WinInet SDK documentation indicates that these functions are best suited to asynchronous use, and Visual Basic requires third-party tools to use asynchronous functions and callbacks. Therefore, this article focuses on HTTP functions, which can safely be called synchronously. (For a look at how you would use the FTP functions asynchronously using Visual C++®, please refer to Robert Coleridge's article, Advanced FTP: Teaching Fido to Phetch.
</quote>

Anthony
0
 

Author Comment

by:soni1978
ID: 7127739
I did see the articles.

The problem now is, it runs for most of the times but sometime it gives errors. Any suggestions are welcomed

Thanks.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7127774
No idea.  I gave up attempting to write it asynchronously and instead came up with a synchronous solution.  In any case, there are far better commercial products that are more robust than anything you or I could devise.  In my case, I had some extra time on my hands and welcomed the challenge.  But I would never recommend it for anything "mission critical".

Good luck,
Anthony
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to measure sizes and angles in scanned images ? 3 89
Passing a Text Box name to a Sub 6 102
vbModal 12 66
Get the Y value of a line at X in a chart in VBA 28 28
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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