FTP Connection using VB 5.0 
Author Message
 FTP Connection using VB 5.0

     I am having trouble with the error message "Still executing last
request" when sending files to an FTP server.  I am writing a program to
that takes records in Access 97, converts them to HTML, then posts them to
an FTP server.  How can I make the program recognize that the last file is
still being transferred and to wait until it is done.  I am using the
following code, but it doesn't seem to work.

    On Error GoTo ConnectionOpen
    FTP.Execute , "PUT " & Path & " " & File

ConnectionOpen:
    Resume
    End Sub

Thanks

Michael



Fri, 19 Jan 2001 03:00:00 GMT  
 FTP Connection using VB 5.0
Hi,

Quote:

>     I am having trouble with the error message "Still executing last
>request" when sending files to an FTP server.  I am writing a program to
>that takes records in Access 97, converts them to HTML, then posts them to
>an FTP server.  How can I make the program recognize that the last file is
>still being transferred and to wait until it is done.  I am using the
>following code, but it doesn't seem to work.

Use the StillExecuting property, it's FALSE when the Control is ready for
the next command.

Regards
Niels



Sun, 21 Jan 2001 03:00:00 GMT  
 FTP Connection using VB 5.0
Does anyone know how to FTP files with Winsock if you know please give me a
clue ..... Thanks in advance
epiC


Fri, 26 Jan 2001 03:00:00 GMT  
 FTP Connection using VB 5.0
Try this  hope this helps...  if you have any questions please email me at

<snip>
    With Inet1
      .URL = "ftp://ftp.yourFtpAddress"
      .UserName = "username"
      .Password = "password"
      .Execute , "CD /WhateverDirYouWant"
      Do
      DoEvents
      Loop Until Inet1.StillExecuting = False
      End With
    With Inet1
      .Execute "ftp://ftp.yourftpaddress", "GET filename.exe
C:\Windows\Temp\filename.exe"

 'This will download a file to your Windows Temp Dir

  ' Use the PUT statement instead of the GET statement to upload files

    With Inet1
    Do
    DoEvents
    Loop Until Inet1.StillExecuting = False
    .Execute , "QUIT"

 End With

End With

End Sub

'This will unload the buffer

Private Sub Inet1_StateChanged(ByVal State As Integer)

       Dim vtData As Variant ' Data variable.

       Select Case State
       ' ... Other cases not shown.
       Case icError ' 11
           ' In case of error, return ResponseCode and

      ' ResponseInfo.
           vtData = Inet1.ResponseCode & ":" & _
           Inet1.ResponseInfo

       Case icResponseCompleted  ' 12
           Dim strData As String: strData = ""
           Dim bDone As Boolean: bDone = False

           ' Get first chunk.
           vtData = Inet1.GetChunk(1024, icString)
           DoEvents

           Do While Not bDone

               strData = strData & vtData
               ' Get next chunk.
               vtData = Inet1.GetChunk(1024, icString)
               DoEvents

               If Len(vtData) = 0 Then
                   bDone = True
               End If
           Loop

       End Select
      End Sub

<snip>

Quote:
>Does anyone know how to FTP files with Winsock if you know please give me a
>clue ..... Thanks in advance
>epiC



Sun, 28 Jan 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. True DB Grid 5.0 and VB 5.0 using RDO

2. True DB Grid 5.0 and VB 5.0 using RDO

3. Using an FTP connection

4. Howto: Write FTP Client in VB 5.0

5. How to use FTP control in VB 5.0

6. How to use FTP control in VB 5.0

7. How to use FTP control in VB 5.0

8. How to use FTP control in VB 5.0

9. ftp in VB 5.0, Internet control usage

10. How to use FTP control in VB 5.0

11. ftp a file (VB 5.0)

12. Checking network connections from inside VB 4.0 or 5.0

 

 
Powered by phpBB® Forum Software