[AccessD] FTP to a web site

Jim Dettman jimdettman at verizon.net
Fri Mar 31 09:03:59 CDT 2023


I use this with Shell():

Public Sub WaitWhileRunning(lngHWnd As Long)

        Dim lngExitCode As Long
        Dim lnghProcess As Long

10      lngExitCode = STILL_ACTIVE
20      lnghProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, lngHWnd)

30      If lnghProcess > 0 Then
40        Do While lngExitCode = STILL_ACTIVE
50          Call GetExitCodeProcess(lnghProcess, lngExitCode)
60          DoEvents
70        Loop
80      End If

90      CloseHandle lnghProcess

End Sub

 And anything else that runs asynchronously.

Jim.

-----Original Message-----
From: AccessD On Behalf Of Stuart McLachlan
Sent: Friday, March 31, 2023 9:20 AM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] FTP to a web site

On 31 Mar 2023 at 8:01, Jim Dettman via AccessD wrote:

> 1. Construct a batch file, and then use Shell() to call it. 
> Personally, I like this approach as it gives you the flexibility to
> use the FTP client you want, and it's testable/debugable (you can type
> the commands manually on a command line, execute the batch file, etc).
>  Only down side is you need an FTP client that can handle command line
> arguments.
> 
The built in WIndows ftp.exe does that ('it's what I use)

But I use a ShellWait function rather than a simple Shell so it pauses until
the FTP session is 
finished.




-- 
AccessD mailing list
AccessD at databaseadvisors.com
https://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list